Coder Social home page Coder Social logo

jlooper / angular-starter Goto Github PK

View Code? Open in Web Editor NEW
106.0 106.0 23.0 3.13 MB

:zap: Build apps for the web, mobile, and desktop with one code base

Home Page: https://github.com/jlooper/angular-starter

License: MIT License

TypeScript 75.28% JavaScript 20.95% CSS 0.53% HTML 3.24%

angular-starter's Introduction

JavaScript Auntie is here!

Blog  Twitter  LinkedIn 
Queen of the Internet

Find me on the interwebz at jenlooper.com or on Twitter @jenlooper. Pronouns are she/her.

Projects of Note:

I've published a textbook for kids in grades 6-8, published by Wiley, entitled Computer Science for Kids. It is alighted to CSTA standards and has a fun, game-driven storyline with bespoke print illustrations. Follow this project here and consider purchasing the book for the cool middle-schooler in your life!

Forthcoming in December 2023 is my latest book, The Illustrated AWS Cloud, a visually-guided story-led approach to learning the fundamentals of Cloud Computing using AWS. Check out its web site here. All the author's proceeds from this book will go to Code To Inspire, a program helping women in Afghanistan learn to code.

Enjoy free Machine Learning zines!

I founded Front-End Foxes, Inc., an international nonprofit, in 2018. Find our awesome workshops and community recipe book.

Check out the Digital Humanities Toolkit, currently under development here.

Some fun facts:

✨ I am Head of Academic Advocacy at AWS.

✨ I worked at Microsoft for several years, co-leading the Academic Team in DevRel among other activities. I've also worked in nonprofits, small startups, and medium sized companies.

✨ I've written some amazing curricula while at my time at Microsoft that ranks very high on GitHub and has millions of views. It's not in the shape I left it, but if you'd like to see it as I originally designed it, with images intact, a fork is here. This is how this curriculum was designed and should look. I also kept copies of the ML, AI, IoT and Data Science curricula which you can find here as well.

✨ I teach occasionally at Boston University's Metropolitan School in the CS department.

✨ I have over 23 years' experience as a web and mobile developer, specializing in creating cross-platform mobile and web apps.

✨ I enjoy using machine learning solutions within a mobile and web context (applied ML).

✨ Mostly these days I build with Vue.js and Astro.

✨ I live in Wellesley, Massachusetts (USA) with my husband and am an empty nester with two adult daughters

My stats

angular-starter's People

Contributors

jlooper avatar mrtedgeesq avatar nathanwalker avatar tjvantoll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-starter's Issues

TypeScript compiler failed with exit code 1

npm run start.android or npm run start.ios

TypeScript compiler failed with exit code 1
Sending exception report (press Ctrl+C to stop).........

npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start.android"
npm ERR! node v7.1.0
npm ERR! npm v3.10.9
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start.android: cd nativescript && tns emulate android
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start.android script 'cd nativescript && tns emulate android'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the basic-web-mobile package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd nativescript && tns emulate android
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs basic-web-mobile
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls basic-web-mobile
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/chengzheng/czpro/angular-starter/npm-debug.log

Remove karma.. or not?

I can see some references to karma and other spec related topics, but no real specs defined (or I'm missing something). Should those be removed altogether? If not, perhaps we can extend the availability (which I think is the better way to go) to actually have a starting ground for that. I think this would be very useful, as any proper project would need them. In this case, adding some docs and maybe some example code would be very useful.

I cannot run the seed app on web, desktop. on iOs and android it gives a heap of errors

Most of the time I am getting this error

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start.desktop"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start.desktop: gulp desktop && NODE_ENV=development electron ./dist/dev
npm ERR! Exit status 1

I have recreated the project several times. Even to install I need to run the install npm command with "sudo"

However Ios installation ran without errors but output was buggy and did not run
Android ran on the emulator but gave a log of errors on missing scripts

I am attaching the desktop build error log here with.

Not sure where the problem is

my system is Mac with macOS Siera 10.12.4
node v 10.7.0
npm v 4.2.0
NativeScript v3.0
Angular v2.4.10/4.1.3 (platform server v 4.1.3 only)

I am new to all this so if there are any shortcomings pl let me know.
Thanks in advance

2017-05-28T23_49_30_825Z-debug copy.txt

npm run start.android doesn't deploy app to physical device

IMPORTANT: This repository's issues are reserved for feature requests and bug reports. Do not submit support requests here.

Steps to reproduce and a minimal demo of the problem
npm run start.android

What steps should we try in your demo to see the problem?

Current behavior
App can't find Android emulator

Expected/desired behavior
App comes up on phone.

Other information
I am running hyper-v so I can't use VirtualBox emulator, so I use physical device

Issues starting up the ios app

To reproduce
run npm run start.ios on a clean repo with the ios platform added

  1. Typescript problems when building:
[0] [23:17:17] Starting 'build.js.tns'...
[1] Successfully prepared plugin nativescript-angular for ios.
[1] Successfully prepared plugin nativescript-intl for ios.
[1] Successfully prepared plugin nativescript-theme-core for ios.
[1] Successfully prepared plugin tns-core-modules for ios.
[1] Successfully prepared plugin tns-core-modules-widgets for ios.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/directives/action-bar.d.ts(2,22): error TS2307: Cannot find module 'ui/page'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/directives/list-view-comp.d.ts(2,26): error TS2307: Cannot find module 'ui/list-view'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/directives/platform-filters.d.ts(1,24): error TS2307: Cannot find module 'platform'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/directives/tab-view.d.ts(2,25): error TS2307: Cannot find module 'ui/tab-view'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/element-registry.d.ts(1,22): error TS2307: Cannot find module 'ui/core/view'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/file-system/ns-file-system.d.ts(1,24): error TS2307: Cannot find module 'file-system'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/platform-providers.d.ts(1,23): error TS2307: Cannot find module 'ui/frame'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/platform-providers.d.ts(2,22): error TS2307: Cannot find module 'ui/page'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/platform-providers.d.ts(4,24): error TS2307: Cannot find module 'platform'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/renderer.d.ts(3,22): error TS2307: Cannot find module 'ui/core/view'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/renderer.d.ts(4,22): error TS2307: Cannot find module 'ui/page'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/renderer.d.ts(7,24): error TS2307: Cannot find module 'platform'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/router.d.ts(3,23): error TS2307: Cannot find module 'ui/frame'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/router/ns-location-strategy.d.ts(2,45): error TS2307: Cannot find module 'ui/frame'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/router/page-router-outlet.d.ts(5,24): error TS2307: Cannot find module 'platform'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/router/page-router-outlet.d.ts(6,23): error TS2307: Cannot find module 'ui/frame'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/router/router-extensions.d.ts(3,23): error TS2307: Cannot find module 'ui/frame'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/value-accessors/checked-value-accessor.d.ts(3,24): error TS2307: Cannot find module 'ui/switch'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/value-accessors/date-value-accessor.d.ts(3,28): error TS2307: Cannot find module 'ui/date-picker'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/value-accessors/number-value-accessor.d.ts(3,24): error TS2307: Cannot find module 'ui/slider'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/value-accessors/selectedIndex-value-accessor.d.ts(3,22): error TS2307: Cannot find module 'ui/core/view'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/value-accessors/text-value-accessor.d.ts(3,22): error TS2307: Cannot find module 'ui/core/view'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/value-accessors/time-value-accessor.d.ts(3,28): error TS2307: Cannot find module 'ui/time-picker'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/view-util.d.ts(1,22): error TS2307: Cannot find module 'ui/core/view'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/view-util.d.ts(2,29): error TS2307: Cannot find module 'ui/content-view'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/view-util.d.ts(3,28): error TS2307: Cannot find module 'ui/layouts/layout-base'.
[0] /Users/konstantin/Documents/Github/the_platform/nativescript/node_modules/nativescript-angular/view-util.d.ts(5,24): error TS2307: Cannot find module 'platform'.
[0] components.module.ts(18,30): error TS2307: Cannot find module './app/shared/sample/components/app/app.component'.
[0] components.module.ts(19,31): error TS2307: Cannot find module './app/shared/sample/components/home/home.component'.
[0] components.module.ts(20,24): error TS2307: Cannot find module './app/shared/sample/components/app/app.routes'.
[0] components.module.ts(23,28): error TS2307: Cannot find module './app/shared/core/core.module'.
[0] components.module.ts(24,30): error TS2307: Cannot find module './app/shared/sample/sample.module'.
[0] mobile/analytics/index.ts(6,34): error TS2307: Cannot find module '../../app/shared/analytics/index'.
[0] mobile/core/services/ns-app.service.ts(6,24): error TS2307: Cannot find module 'application'.
[0] mobile/core/services/ns-app.service.ts(7,34): error TS2307: Cannot find module 'platform'.
[0] mobile/core/services/ns-app.service.ts(20,28): error TS2307: Cannot find module '../../../app/shared/core/services/app.service'.
[0] mobile/core/services/ns-app.service.ts(21,24): error TS2307: Cannot find module '../../../app/shared/core/utils'.
[0] mobile/core/services/ns-app.service.ts(22,61): error TS2307: Cannot find module '../../../app/shared/core/index'.
[0] mobile/core/services/ns-app.service.ts(23,34): error TS2307: Cannot find module '../../../app/shared/analytics/index'.
[0] mobile/core/services/ns-app.service.ts(25,31): error TS2307: Cannot find module '../../../app/shared/i18n/index'.
[0] mobile/core/services/window-native.service.ts(2,26): error TS2307: Cannot find module 'ui/dialogs'.
[0] mobile/core/services/window-native.service.ts(3,24): error TS2307: Cannot find module 'platform'.
[0] mobile/core/services/window-native.service.ts(6,25): error TS2307: Cannot find module '../../../app/shared/core/interfaces/iwindow'.
[0] mobile/core/utils/actionbar.util.ts(1,25): error TS2307: Cannot find module 'ui/frame'.
[0] mobile/core/utils/actionbar.util.ts(2,41): error TS2307: Cannot find module 'ui/action-bar'.
[0] mobile/core/utils/actionbar.util.ts(3,22): error TS2307: Cannot find module 'application'.
[0] mobile/core/utils/actionbar.util.ts(4,35): error TS2307: Cannot find module 'platform'.
[0] native.module.ts(20,8): error TS2307: Cannot find module './app/shared/core/index'.
[0] native.module.ts(21,30): error TS2307: Cannot find module './app/shared/sample/components/app/app.component'.
[0] native.module.ts(22,24): error TS2307: Cannot find module './app/shared/sample/components/app/app.routes'.
[0] native.module.ts(25,28): error TS2307: Cannot find module './app/shared/core/core.module'.
[0] native.module.ts(36,24): error TS2307: Cannot find module './app/shared/core/index'.
[0] native.module.ts(37,22): error TS2307: Cannot find module 'ui/page'.
[0] native.module.ts(49,27): error TS2307: Cannot find module './app/shared/sample/services/app-config'.
[0] vendor-platform.android.ts(11,1): error TS2304: Cannot find name 'require'.
[0] vendor-platform.android.ts(12,1): error TS2304: Cannot find name 'require'.
[0] vendor-platform.android.ts(13,1): error TS2304: Cannot find name 'require'.
[0] vendor-platform.android.ts(15,5): error TS2304: Cannot find name 'global'.
[0] vendor-platform.android.ts(16,5): error TS2304: Cannot find name 'global'.
[0] vendor-platform.android.ts(18,20): error TS2304: Cannot find name 'require'.
[0] vendor-platform.android.ts(20,20): error TS2304: Cannot find name 'require'.
[0] vendor-platform.android.ts(22,20): error TS2304: Cannot find name 'require'.
[0] vendor.ts(1,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(3,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(4,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(5,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(6,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(7,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(8,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(9,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(11,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(12,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(13,1): error TS2304: Cannot find name 'require'.
[0] vendor.ts(14,1): error TS2304: Cannot find name 'require'.
  1. Sass problem, common not found:
[23:17:04] Using gulpfile ~/rootfolder/gulpfile.ts
[23:17:04] Starting 'build.tns'...
[23:17:04] Starting 'build.assets.tns'...
[23:17:05] Finished 'build.assets.tns' after 461 ms
[23:17:05] Starting 'build.tns_html_css'...
Error in plugin 'sass'
Message:
    nativescript/src/app.android.scss
Error: File to import not found or unreadable: common.
       Parent style sheet: /../rootfolder/nativescript/src/app.android.scss
        on line 1 of nativescript/src/app.android.scss
>> @import 'common';
  1. Cannot find shared/core:
[1] file:///app/native.module.js:5:22: JS ERROR Error: Could not find module './app/shared/core/index'. Computed path '/Users/konstantin/Library/Developer/CoreSimulator/Devices/A51760AD-2774-4DF3-AC32-408F21CC467C/data/Containers/Bundle/Application/8A90A6B9-1C2A-4918-A479-989916C5931F/nativescript.app/app/app/shared/core/index'.
[1] Mar 22 23:19:17 Konstantins-MacBook-Pro com.apple.CoreSimulator.SimDevice.A51760AD-2774-4DF3-AC32-408F21CC467C.launchd_sim[45674] (UIKitApplication:com.yourdomain.nativescript[0x6804][45992]): Service exited due to Segmentation fault: 11

Regardless, the simulator starts up, but unfortunately no application shows up.

Your help is much appreciated :)

UNMENT PEER DEPENDENCY when adding platforms

Current behavior
After cloning a clean version of the repo having npm packages installed,
running tns platform add android/ios does it's thing, but results with:

├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── [email protected]
└── UNMET PEER DEPENDENCY [email protected]

Despite that, it says Project successfully created. afterwards, which is still not giving me too much confidence

npm run start throwing exception TSError: ⨯ Unable to compile TypeScript Cannot find type definition file for 'node'. (2688)

I am getting following exception while running npm run start

TSError: ⨯ Unable to compile TypeScript
Cannot find type definition file for 'node'. (2688)
gulpfile.ts (1,23): Cannot find module 'gulp'. (2307)
gulpfile.ts (2,23): Cannot find module 'gulp-util'. (2307)
gulpfile.ts (3,30): Cannot find module 'run-sequence'. (2307)
gulpfile.ts (5,20): Cannot find module './tools/config'. (2307)
gulpfile.ts (6,47): Cannot find module './tools/utils'. (2307)
at getOutput (/Users/apple/Desktop/NativeScript_RandD/angular-starter-master/node_modules/ts-node/src/index.ts:316:17)
at /Users/apple/Desktop/NativeScript_RandD/angular-starter-master/node_modules/ts-node/src/index.ts:347:18
at Object.compile (/Users/apple/Desktop/NativeScript_RandD/angular-starter-master/node_modules/ts-node/src/index.ts:474:19)
at Module.m._compile (/Users/apple/Desktop/NativeScript_RandD/angular-starter-master/node_modules/ts-node/src/index.ts:410:44)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .ts] (/Users/apple/Desktop/NativeScript_RandD/angular-starter-master/node_modules/ts-node/src/index.ts:413:12)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: gulp serve.dev --color
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/apple/.npm/_logs/2017-10-25T11_52_14_185Z-debug.log

Build Error When Duplicating Home Component

Steps to reproduce
Duplicate Home component and add references throughout client code:

Created src/client/app/frameworks/sample/components/login with the following contents:

login.css (empty)
login.tns.css (empty)
login.component.tns.html (empty)
login.component.html:

<form>
  <label for="">Username</label>
  <input type="text" name="username" value="">
  <label for="">Password</label>
  <input type="password" name="password" value="">
</form>

login.component.ts

import { OnInit } from '@angular/core';
import { BaseComponent } from '../../../core/decorators/base.component';

@BaseComponent({
  moduleId: module.id,
  selector: 'sd-home',
  templateUrl: 'login.component.html',
  styleUrls: ['login.css']
})
export class LoginComponent implements OnInit {

  constructor() {}

  ngOnInit() {

  }
}

login.routes.ts:

import { Route } from '@angular/router';

import { LoginComponent } from './login.component';

export const LoginRoutes: Route[] = [
  {
    path: '/login',
    component: LoginComponent
  },
];

Modified the following files:

src/client/app/frameworks/sample/routes.ts:

import {HomeRoutes} from './components/home/home.routes';
import {LoginRoutes} from './components/login/login.routes';

export const routes: Array<any> = [
  ...HomeRoutes,
  ...LoginRoutes
];

src/client/app/frameworks/sample/components/index.ts:

import { HomeComponent } from './home/home.component';
import { LoginComponent } from './login/login.component';


// for routes
export const ENTRY_COMPONENTS: any[] = [
  HomeComponent,
  LoginComponent
];

export * from './app/app.component';
export * from './home/home.component';
export * from './login/login.component';

src/client/app/frameworks/sample/components/app/app.routes.ts:

// app
import {HomeRoutes} from '../../components/home/home.routes';
import {LoginRoutes} from '../../components/login/login.routes';

export const routes: Array<any> = [
  ...HomeRoutes,
  ...LoginRoutes
];

Current behavior
New TS files are never compiled to JS counterparts.
Project does not build correctly, and browser window shows Loading...

Chrome developer tools console shows:

Failed to load resource: the server responded with a status of 404 (Not Found)
zone.js?1486153429616:344 Unhandled Promise rejection: Failed to load http://localhost:5555/app/frameworks/sample/components/login/login.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load http://localhost:5555/app/frameworks/sample/components/login/login.component.html undefined
consoleError @ zone.js?1486153429616:344
zone.js?1486153429616:346 Error: Uncaught (in promise): Failed to load http://localhost:5555/app/frameworks/sample/components/login/login.component.html
    at resolvePromise (zone.js?1486153429616:418)
    at resolvePromise (zone.js?1486153429616:403)
    at zone.js?1486153429616:451
    at ZoneDelegate.invokeTask (zone.js?1486153429616:225)
    at Zone.runTask (zone.js?1486153429616:125)
    at drainMicroTaskQueue (zone.js?1486153429616:357)
    at XMLHttpRequest.ZoneTask.invoke (zone.js?1486153429616:297)

Build process in command line shows the following error:

[14:48:35] Using gulpfile C:\Development\WebDev\web-banking-native\gulpfile.ts
[14:48:35] Starting 'serve.dev'...
[14:48:35] Starting 'build.dev'...
[14:48:35] Starting 'build.assets.dev'...
[14:48:36] Finished 'build.assets.dev' after 229 ms
[14:48:36] Starting 'build.html_css'...
[14:48:36] Finished 'build.html_css' after 788 ms
[14:48:36] Starting 'build.js.dev'...
src\client\tokens.web.ts(1,9): error TS2305: Module '"C:/Development/WebDev/my-app/src/client/app/frameworks/core/tokens"' has no exported member 'ENUMS'.
[14:48:39] TypeScript: 1 semantic error
[14:48:39] TypeScript: emit succeeded (with errors)
[14:48:39] Finished 'build.js.dev' after 2.58 s
[14:48:39] Starting 'build.index.dev'...
[14:48:39] gulp-inject 4 files into index.html.
[14:48:39] gulp-inject 2 files into index.html.
[14:48:39] gulp-inject Nothing to inject into index.html.
[14:48:39] Finished 'build.index.dev' after 143 ms
[14:48:39] Finished 'build.dev' after 3.74 s
[14:48:39] Starting 'server.start'...
[14:48:39] Finished 'server.start' after 103 ms
[14:48:39] Starting 'watch.dev'...
[14:48:39] Finished 'watch.dev' after 127 ms
[14:48:39] Finished 'serve.dev' after 3.98 s
[BS] Access URLs:
 -------------------------------------
       Local: http://localhost:5555/
    External: http://223.1.1.192:5555/
 -------------------------------------
          UI: http://localhost:3001
 UI External: http://223.1.1.192:3001
 -------------------------------------
[BS] Serving files from: dist/empty/

Referring to this reference in src/client/tokens.web.ts:

import {ENUMS} from './app/frameworks/core/tokens';

export const TOKENS_WEB: Array<any> = [
  { provide: ENUMS, useValue: {} }
];

Expected/desired behavior
Expected build to succeed.

Extend documentation hub

Would be nice to add the docs regarding setting up a new project with git clone, set upstream, etc best practices, as seen in @NathanWalker's advanced seed: here . This seems even more useful for the starter seed, especially considering that the knowledge of developers might be lower, so I find it useful to copy this part of the doc also here.

Unable to create symlink

Steps to reproduce and a minimal demo of the problem

Follow instructions from (https://jlooper.github.io/angular-starter/#prerequisites)

Current behavior

npm install fails with:

npm WARN [email protected] No license field.
Configuring...
**A symlink already exists.**
------------------------ Angular Seed Advanced is Now Ready ----------------------------

Run your web app with:
  npm start

Run your Mobile app via NativeScript with:
  iOS:     npm run start.ios
  Android: npm run start.android

Run your Desktop app via Electron with:
  Mac:     npm run start.desktop
  Windows: npm run start.desktop.windows

-----------------------------------------------------------------------------------------

**We were unable to create a symlink**  - from -
   /Users/mike/Code/sp-surfer/src/client/app     - to - 
   /Users/mike/Code/sp-surfer/nativescript/src/app
If you don't create this symlink, you will have to manually copy the code each time you change it.

After this, running npm run ios.start crashes and burns. Should one of the directories above be empty?

Expected/desired behavior

No errors.

Other information

macOS Sierra 10.12.3

Update to Angular 4

As of today (28 March), Nativescript supports the newly updated Angular 4 version.

Guidelines on how to update to it are posted here
https://www.nativescript.org/blog/nativescript-supports-angular-4

To consider:
angular animations are now a separate module, which means that they are optional. Considering that this project is in the "basic seed" nature, I am not sure if this dependency should be always be included. I think it'd be nice to have a 3 step process on how to extend the project with such features, but they shouldn't necessarily be included in the project. This opinion is from a person with little to no experience with Angular 2, so you find them essential, they could also be already included.

It'd be nice if somebody picks this up (could be me, if I find time in T + 24h from now).

Debugging Electron with VSCode - Source Map generation

Steps to reproduce and a minimal demo of the problem
Note I am running on Windows (8.1)
follow steps to setup and build in readme
open project in Visual Studio Code, I'm using following version:

Version 1.10.2
Commit 8076a19fdcab7e1fc1707952d652f0bb6c6db331
Date 2017-03-08T14:02:52.799Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

On debug tab select "Launch Electron App" for the configuration.
I've edited the configuration slightly, changing the path to runtimeexecutable and adding the outFiles attribute:

{
			
            "name": "Launch Electron App",
            "type": "node",
            "program": "${workspaceRoot}/dist/dev/main.desktop.js", // important
            "stopOnEntry": false,
            "args": [],
            "cwd": "${workspaceRoot}/dist/dev/",
            // next line is very important
            //"runtimeExecutable": "${env.APPDATA}/npm/node_modules/electron-prebuilt/dist/electron.exe",
			"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
			"outFiles": [
				"${workspaceRoot}/dist/**/*.js"
			],
            "runtimeArgs": [],
            "env": { }, 			
            "sourceMaps": true
        }

Open main.desktop.ts and set a breakpoint ~ line 43.
Press F5 to start debugging.
The Electron app will start but the breakpoint will not be hit and will display greyed out. Hovering over the breakpoint you'll see:

Breakpoint ignored because generated code not found (source map problem?).

Being new to Electron/js development took me a bit of digging but I finally came across the comments in file:
/tools/tasks/seed/build.js.dev.ts
~line 66:

// Use for debugging with Webstorm/IntelliJ
        // https://github.com/mgechev/angular-seed/issues/1220
//  .pipe(plugins.sourcemaps.write('.', {
          //    includeContent: false,
          //    sourceRoot: (file: any) =>
          //      relative(file.path, Config.PROJECT_ROOT + '/' + Config.APP_SRC).replace(sep, '/') + '/' + Config.APP_SRC
          //  }))

I figured this applied to VS Code too. Uncommenting those lines (as well as line 5) did produce the .js.map files however the paths generated in those files were not correct. If you look inside the .js.map file you'll see:

file":"main.desktop.js","sourceRoot":"../src/client"

I came across this issue: mgechev/angular-seed#1220
Following the solution in there to generate the source maps, changing the above code to:

.pipe(plugins.sourcemaps.write('.', {
includeContent: false,
sourceRoot: (file: any) =>
relative(Config.APP_DEST, Config.PROJECT_ROOT) + '/' + Config.APP_SRC
}))

Generated source maps with the correct paths:

file":"main.desktop.js","sourceRoot":"../../src/client"

After rebuilding I was now able to debug using VS Code. It's important that the outFiles in the launch configuration is also set, otherwise even with the .js.map files debugging will not work for the main process.

For completeness here is my launch configurations for debugging the main and renderer process for Electron (renderer process requires Debug tools for Chrome installed in VS Code):

{
			
            "name": "Launch Electron App",
            "type": "node",
            "program": "${workspaceRoot}/dist/dev/main.desktop.js", // important
            "stopOnEntry": false,
            "args": [],
            "cwd": "${workspaceRoot}/dist/dev/",
            // next line is very important
            //"runtimeExecutable": "${env.APPDATA}/npm/node_modules/electron-prebuilt/dist/electron.exe",
			"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
			"outFiles": [
				"${workspaceRoot}/dist/**/*.js"
			],
            "runtimeArgs": [],
            "env": { }, 			
            "sourceMaps": true
        },
		{
            "name": "Debug Renderer Process",
            "type": "chrome",
            "request": "launch",
            "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
            "runtimeArgs": [
              "${workspaceRoot}/dist/dev",
              "--enable-logging",
              "--remote-debugging-port=9222"
            ],
            "sourceMaps": true,
            "webRoot": "${workspaceRoot}/dist/dev"
        }

I think on non windows platforms the runtimeExecutable doesn't need the .cmd on the end.

Perhaps I'm missing something obvious, but this was the only way I could get debugging inside VS Code to work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.