NathanWalker / angular-seed-advanced

Advanced Angular seed project with support for ngrx/store, ngrx/effects, ngx-translate, angulartics2, lodash, NativeScript (*native* mobile), Electron (Mac, Windows and Linux desktop) and more.
MIT License
2.26k stars 445 forks source link

{N} Android crashes on Windows with ng2-config & map operator #327

Closed ghys closed 7 years ago

ghys commented 7 years ago

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see use [gitter](https://gitter.im/mgechev/angular2-seed) or [stackoverflow](https://stackoverflow.com/questions/tagged/angular2)

Current behavior

When trying to run start.android on Windows with the current HEAD (https://github.com/NathanWalker/angular-seed-advanced/commit/7a412db93af0606b23267b0aca4b8fca62738ce2), the following happens:

JS: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
JS: ns-renderer: this.http.get(...).map is not a function
JS:
JS: TypeError: this.http.get(...).map is not a function
JS:     at t.init (/data/data/com.yourdomain.appname/files/app/tns_modules/ng2-config/bundles/ng2-config.umd.min.js:1:2270)
JS:     at Array.<anonymous> (/data/data/com.yourdomain.appname/files/app/tns_modules/ng2-config/bundles/ng2-config.umd.min.js:1:3162)
JS:     at new ApplicationInitStatus (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/@angular/core/bundles/core.umd.js:3028:49)
JS:     at NgModuleInjector.get (/NativeModule/module.ngfactory.js:96:87)
JS:     at NgModuleInjector.NativeModuleInjector.createInternal (/NativeModule/module.ngfactory.js:393:153)
JS:     at NgModuleInjector.create (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/@angular/core/bundles/core.umd.js:6715:80)
JS:     at NgModuleFactory.create (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/@angular/core/bundles/core.umd.js:6700:22)
JS:     at /data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/@angular/core/bundles/core.umd.js:6418:47
JS:     at ZoneDelegate.invoke (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:190:28)
JS:     at Object.onInvoke (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/@angular/core/bundles/core.umd.js:5976:41)

Expected behavior

The application should run.

Minimal reproduction of the problem with instructions

I figured this was a problem related to the recent addition of ng2-config, so I revert to a previous version before it was included (https://github.com/NathanWalker/angular-seed-advanced/commit/4da2e0de2a1446b2a5bf7208ff72784117905086) and the Android app runs fine.

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start.livesync.android.device"
npm ERR! node v6.4.0
npm ERR! npm  v3.10.3

...and Merry Christmas! 🎄 😉

brettdaman commented 7 years ago

+1

fourctv commented 7 years ago

+1

it seems to be related to the rxjs upgrade to 5.0.2, based on npm i warning: npm WARN ng2-config@1.1.1 requires a peer of rxjs@5.0.0-beta.12 but none was installed.

works fine on iOS.

m-abs commented 7 years ago

Try running npm ls rxjs in the nativescript-folder, so you can see if rxjs have been installed.

fourctv commented 7 years ago

@m-abs it is there, and as I mentioned the problem is android only, it works fine on iOS.

millea1 commented 7 years ago

+1

m-abs commented 7 years ago

Ahh I see.

I think this is caused by nativescript-angular still being stuck on angular-2.2.x while this project is at angular-2.4.x.

If you look at the full tree from npm ls, you can see nativescript-angular have it's own versions of angular, rxjs and zone.js. As far as I understand it {N} only copies one version of a given package into the platforms tns-core-modules-folder, I don't know if {N} have different selection criteria on iOS and Android that could explain why it only broke on Android.

I think you have to downgrade angular, rxjs and zone.js, until nativescript-angular gets updated, hopefully after new year when this PR is closed.

In the mean while use this package.json in the nativescript-folder:

{
  "name": "angular-seed-advanced",
  "main": "app.js",
  "version": "0.0.0",
  "nativescript": {
    "id": "com.yourdomain.appname",
    "tns-ios": {
      "version": "2.4.0"
    },
    "tns-android": {
      "version": "2.4.1"
    }
  },
  "scripts": {
    "clean": "rm -rf platforms node_modules lib hooks"
  },
  "dependencies": {
    "@angular/common": "~2.2.0",
    "@angular/compiler": "~2.2.0",
    "@angular/core": "~2.2.0",
    "@angular/forms": "~2.2.0",
    "@angular/http": "~2.2.0",
    "@angular/platform-browser": "~2.2.0",
    "@angular/platform-browser-dynamic": "~2.2.0",
    "@angular/router": "~3.2.1",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^2.0.0",
    "@ngrx/store": "^2.2.1",
    "angulartics2": "^1.6.1",
    "es6-promise": "^3.0.2",
    "es6-shim": "^0.35.0",
    "lodash": "^4.16.4",
    "nativescript-angular": "next",
    "nativescript-theme-core": "^1.0.2",
    "ng2-config": "1.1.1",
    "ng2-translate": "^5.0.0",
    "ngrx-store-freeze": "0.1.0",
    "parse5": "1.3.2",
    "punycode": "1.3.2",
    "querystring": "0.2.0",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.0.0-beta.12",
    "tns-core-modules": "2.4.2",
    "url": "0.10.3"
  },
  "devDependencies": {
    "@ngrx/store-devtools": "^3.2.2",
    "@types/jasmine": "^2.5.35",
    "babel-traverse": "6.12.0",
    "babel-types": "6.11.1",
    "babylon": "6.8.4",
    "filewalker": "0.1.2",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "shelljs": "^0.7.0",
    "typescript": "^2.0.9",
    "zone.js": "^0.6.21"
  }
}

Unfortunately this means that web and {N} will run with different versions of those packages, this might lead to inconsistent behavior.

ponty7 commented 7 years ago

Updating package.json with above, in nativescript folder, still crashes android on windows for me.

image

m-abs commented 7 years ago

@ponty7 Have you have tried running npm run clean in the nativescript-folder? If not try that and reinstall.

I had the same problem, I should have mentioned that a reset was needed.

fourctv commented 7 years ago

although that fixes android, it'll break again when we move up to ng2 2.4.1. the solution is for @fulls1z3 to fix ng2-config

fulls1z3 commented 7 years ago

Hi @fourctv, I have updated ng2-config to work with ng2 2.4.1 and rxjs 5.0.1. The latest version is 1.1.2 now.

I'll test the source of angular-seed-advanced with with ng2-config 1.1.2 and PR the results accordingly.

NathanWalker commented 7 years ago

@fulls1z3 thanks, just pushed to master the new 1.1.2 ng2-config. Runs on Android here for me but I don't think I tried with map operator, however @fourctv please pull latest master and let us know.

ghys commented 7 years ago

Just tried from a previous non-working installation with

...and the same problem remains?

Here's my npm list output in the nativescript folder (note ng2-config@1.1.2):

angular-seed-advanced@0.0.0 F:\dev\angular-seed-advanced\nativescript
+-- @angular/common@2.4.1
+-- @angular/compiler@2.4.1
+-- @angular/core@2.4.1
+-- @angular/forms@2.4.1
+-- @angular/http@2.4.1
+-- @angular/platform-browser@2.4.1
+-- @angular/platform-browser-dynamic@2.4.1
+-- @angular/router@3.4.1
+-- @ngrx/core@1.2.0
+-- @ngrx/effects@2.0.0
+-- @ngrx/store@2.2.1
+-- @ngrx/store-devtools@3.2.2
+-- @types/jasmine@2.5.38
+-- angulartics2@1.6.3
+-- babel-traverse@6.12.0
| +-- babel-code-frame@6.20.0
| | +-- chalk@1.1.3
| | | +-- ansi-styles@2.2.1
| | | +-- escape-string-regexp@1.0.5
| | | +-- has-ansi@2.0.0
| | | | `-- ansi-regex@2.0.0
| | | +-- strip-ansi@3.0.1
| | | `-- supports-color@2.0.0
| | `-- js-tokens@2.0.0
| +-- babel-messages@6.8.0
| +-- babel-runtime@6.20.0
| | +-- core-js@2.4.1
| | `-- regenerator-runtime@0.10.1
| +-- debug@2.5.1
| | `-- ms@0.7.2
| +-- globals@8.18.0
| `-- invariant@2.2.2
|   `-- loose-envify@1.3.0
+-- babel-types@6.11.1
| +-- esutils@2.0.2
| `-- to-fast-properties@1.0.2
+-- babylon@6.8.4
+-- es6-promise@3.3.1
+-- es6-shim@0.35.2
+-- filewalker@0.1.2
| `-- fqueue@0.0.0
+-- lazy@1.0.11
+-- lodash@4.17.3
+-- nativescript-angular@1.3.0-2016-12-15-1167
| +-- @angular/common@2.2.4
| +-- @angular/compiler@2.2.4
| +-- @angular/core@2.2.4
| +-- @angular/forms@2.2.4
| +-- @angular/http@2.2.4
| +-- @angular/platform-browser@2.2.4
| +-- @angular/platform-browser-dynamic@2.2.4
| +-- @angular/router@3.2.4
| +-- nativescript-intl@0.0.10
| +-- rxjs@5.0.0-beta.12
| `-- UNMET PEER DEPENDENCY zone.js@^0.6.21
+-- nativescript-dev-typescript@0.3.5
| `-- nativescript-hook@0.2.1
|   +-- glob@6.0.4
|   `-- mkdirp@0.5.1
|     `-- minimist@0.0.8
+-- nativescript-theme-core@1.0.2
+-- ng2-config@1.1.2
+-- ng2-translate@5.0.0
+-- ngrx-store-freeze@0.1.0
| `-- deep-freeze@0.0.1
+-- parse5@1.3.2
+-- punycode@1.3.2
+-- querystring@0.2.0
+-- reflect-metadata@0.1.9
+-- rxjs@5.0.2
| `-- symbol-observable@1.0.4
+-- shelljs@0.7.5
| +-- glob@7.1.1
| | +-- fs.realpath@1.0.0
| | +-- inflight@1.0.6
| | | `-- wrappy@1.0.2
| | +-- inherits@2.0.3
| | +-- minimatch@3.0.3
| | | `-- brace-expansion@1.1.6
| | |   +-- balanced-match@0.4.2
| | |   `-- concat-map@0.0.1
| | +-- once@1.4.0
| | `-- path-is-absolute@1.0.1
| +-- interpret@1.0.1
| `-- rechoir@0.6.2
|   `-- resolve@1.2.0
+-- tns-core-modules@2.4.4
| `-- tns-core-modules-widgets@2.4.0
+-- typescript@2.1.4
+-- url@0.10.3
`-- zone.js@0.7.4

I take it @m-abs's advice to downgrade angular to 2.2.4 because of nativescript-angular is still applicable?

m-abs commented 7 years ago

@ghys A minor update to my advice: nativescript-angular@next are at angular 2.3.1 now, so you need to downgrade angular to 2.3.1 and rxjs to 5.0.0-rc.4.

I haven't tested it yet, as I'm working on #323 and it breaks webpack-bundling for now...

fourctv commented 7 years ago

@NathanWalker sorry but still no go on android. works fine on iOS.

I did a git.merge, ran clean on nativescript and then tries start.ios and start.android, same result.

I wonder how come you said it worked for you with seed/master. The http.map fail is on ng2-config, which uses http.map to load app.config.json config file, as you can see from @ponty7 post.

Based on my observations the problem seems to be incompatibilities between ng2-config and rxjs@5.0.2. If I follow @m-abs suggestion and downgrade to rxjs@5.0.0-rc.4 it works. So either ng2-config or {N} is not compatible with the latest rxjs.

NathanWalker commented 7 years ago

I experience no issues on my end, just cloned latest master, npm i, then npm start... all other build commands also work including {N} for iOS and Android, and desktop electron. ?

NathanWalker commented 7 years ago

@fourctv ensure you have done this:

cd nativescript
rm -rf hooks lib node_modules platforms
npm i
tns run android

I'm on node 6.9.1 and npm 3.10.9 with Mac Sierra.

NathanWalker commented 7 years ago

Also what version of {N} do you have installed? run: tns --version

I am on 2.4.2. To update: npm i -g nativescript Then you would need to do this again:

cd nativescript
rm -rf hooks lib node_modules platforms
npm i
tns run android
fourctv commented 7 years ago

@NathanWalker I am also on tns 2.4.2 and node 6.9.1. On El Captain, and npm 3.10.8.

I just downloaded a fresh seed master, ran:

npm i
npm start
npm run start.android

Web runs fine, but android fails at the exact same place: http.map...

And again, if I change nativescript/package.json and force rxjs to version 5.0.0-rc.4 and then do:

cd nativecript
npm run clean
cd ..
npm run start.android

It works, so whatever the problem is, it is related to rxjs version. It could even be something on my environment, but I cannot think of anything as we seem to be running the same versions 9except for npm)

ponty7 commented 7 years ago

+1

NathanWalker commented 7 years ago

@fourctv I believe I will remove ng2-config for reasons stated here and here unless @fulls1z3 has a solution.

But again things run fine on my system doing exact same steps so def odd.

fourctv commented 7 years ago

@NathanWalker agreed

fulls1z3 commented 7 years ago

Hi @fourctv @NathanWalker @ponty7 .

Sorry for late answer, but it seems we're all suffering just after the stability interjection as of angular 2.4.0.

If I understood correctly, we're talking about an incompability between ng2-config and rxjs 5.0.2. I'll update the ng2-config to work with the latest rxjs (5.0.2), test and share results with you shortly.

Meantime, any ideas or support is appreciated.

NathanWalker commented 7 years ago

@ghys @fourctv ng2-config is now removed on master. Please pull in these latest changes (which reverts things back to how they were before) and lemme know if all good for you. Ensure to clean everything once again after the pull:

git fetch upstream
git merge upstream/master
rm -rf node_modules nativescript/node_modules nativescript/hooks nativescript/lib nativescript/platforms
npm i
ghys commented 7 years ago

@NathanWalker don't know if it's just me, but I'm going through dependency hell...

With an untouched nativescript/package.json from the latest changes, the graph looks like this:

+-- @angular/common@2.4.2
+-- @angular/compiler@2.4.2
+-- @angular/core@2.4.2
+-- @angular/forms@2.4.2
+-- @angular/http@2.4.2
+-- @angular/platform-browser@2.4.2
+-- @angular/platform-browser-dynamic@2.4.2
+-- @angular/router@3.4.2
+-- angulartics2@1.6.3
+-- nativescript-angular@1.3.1-2017-01-05-1183
| +-- @angular/common@2.3.1
| +-- @angular/compiler@2.3.1
| +-- @angular/core@2.3.1
| +-- @angular/forms@2.3.1
| +-- @angular/http@2.3.1
| +-- @angular/platform-browser@2.3.1
| +-- @angular/platform-browser-dynamic@2.3.1
| +-- @angular/router@3.3.1
| `-- rxjs@5.0.0-rc.4
+-- ng2-translate@5.0.0
+-- rxjs@5.0.2
`-- zone.js@0.7.4

and the result (at least for me) is a stack overflow:

JS: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
JS: ns-renderer: Maximum call stack size exceeded
JS:
JS: RangeError: Maximum call stack size exceeded
JS:     at ScanSubscriber.Subscription (/data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/Subscription.js:25:26)
JS:     at ScanSubscriber.Subscriber [as constructor] (/data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/Subscriber.js:32:16)
JS:     at new ScanSubscriber (/data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:79:16)
JS:     at ScanOperator.call (/data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:67:33)
JS:     at AnonymousSubject.Observable.subscribe (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/rxjs/Observable.js:42:22)
JS:     at ScanOperator.call (/data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:67:23)
JS:     at AnonymousSubject.Observable.subscribe (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/rxjs/Observable.js:42:22)
JS:     at ScanOperator.call (/data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:67:23)
JS:     at AnonymousSubject.Observable.subscribe (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/rxjs/Observable.js:42:22)
JS:     at ScanOperator.call (/data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:67:23)
JS:     at AnonymousSubject.Observable.subscribe (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/rxjs/Observable.js:42:22)

So then I downgraded Angular and rxjs to match nativescript-angular's versions (2.3.1 & 5.0.0-rc4, respectively, with the router @ ~3.3.1), and I got this instead - a problem with angulartics2:

JS: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
JS: ns-renderer: router.events.filter is not a function
JS:
JS: TypeError: router.events.filter is not a function
JS:     at Angulartics2.trackLocation (/data/data/com.yourdomain.appname/files/app/tns_modules/angulartics2/dist/core/angulartics2.js:33:14)
JS:     at new Angulartics2 (/data/data/com.yourdomain.appname/files/app/tns_modules/angulartics2/dist/core/angulartics2.js:28:14)
JS:     at NgModuleInjector.get (/NativeModule/module.ngfactory.js:173:69)
JS:     at NgModuleInjector.get (/NativeModule/module.ngfactory.js:183:108)
JS:     at NgModuleInjector.get (/NativeModule/module.ngfactory.js:313:117)
JS:     at NgModuleInjector.NativeModuleInjector.createInternal (/NativeModule/module.ngfactory.js:388:101)
JS:     at NgModuleInjector.create (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/@angular/core/bundles/core.umd.js:8897:80)
JS:     at NgModuleFactory.create (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/@angular/core/bundles/core.umd.js:8871:22)
JS:     at /data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/@angular/core/bundles/core.umd.js:8443:65
JS:     at ZoneDelegate.invoke (/data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:190:28)

I tried downgrading angulartics2 a few versions but was unsuccessful in resolving this, so as a last resort I brought everything back to angular@~2.2.3, rxjs@5.0.0beta.12 and zone.js@0.6.21, pinned down a few packages and now have a version that seems to work. Here's my package.json diff for the interested:

diff --git a/nativescript/package.json b/nativescript/package.json
index eb9bb18..184253a 100644
--- a/nativescript/package.json
+++ b/nativescript/package.json
@@ -15,30 +15,30 @@
     "clean": "rm -rf platforms node_modules lib hooks"
   },
   "dependencies": {
-    "@angular/common": "~2.4.0",
-    "@angular/compiler": "~2.4.0",
-    "@angular/core": "~2.4.0",
-    "@angular/forms": "~2.4.0",
-    "@angular/http": "~2.4.0",
-    "@angular/platform-browser": "~2.4.0",
-    "@angular/platform-browser-dynamic": "~2.4.0",
-    "@angular/router": "~3.4.1",
+    "@angular/common": "~2.2.3",
+    "@angular/compiler": "~2.2.3",
+    "@angular/core": "~2.2.3",
+    "@angular/forms": "~2.2.3",
+    "@angular/http": "~2.2.3",
+    "@angular/platform-browser": "~2.2.3",
+    "@angular/platform-browser-dynamic": "~2.2.3",
+    "@angular/router": "~3.2.0",
     "@ngrx/core": "^1.2.0",
     "@ngrx/effects": "^2.0.0",
     "@ngrx/store": "^2.2.1",
-    "angulartics2": "^1.6.3",
+    "angulartics2": "1.6.1",
     "es6-promise": "^3.0.2",
     "es6-shim": "^0.35.0",
     "lodash": "^4.16.4",
-    "nativescript-angular": "next",
+    "nativescript-angular": "1.3.0-2016-12-15-1167",
     "nativescript-theme-core": "^1.0.2",
-    "ng2-translate": "^5.0.0",
+    "ng2-translate": "^4.2.0",
     "ngrx-store-freeze": "0.1.0",
     "parse5": "1.3.2",
     "punycode": "1.3.2",
     "querystring": "0.2.0",
     "reflect-metadata": "^0.1.8",
-    "rxjs": "5.0.2",
+    "rxjs": "5.0.0-beta.12",
     "tns-core-modules": "2.4.4",
     "url": "0.10.3"
   },
@@ -53,6 +53,6 @@
     "nativescript-dev-typescript": "^0.3.5",
     "shelljs": "^0.7.0",
     "typescript": "^2.0.9",
-    "zone.js": "^0.7.2"
+    "zone.js": "^0.6.21"
   }
 }

I'll try updating back to the latest versions in a few weeks or once nativescript-angular and the seed target the same Angular/rxjs.

Cheers!

ponty7 commented 7 years ago

+1 I've wiped/cleaned nativescript folder and I get exact same errors too, on Windows 10. tns - 2.4.2 npm - 3.10.9 node - v6.9.2

derekdon commented 7 years ago

@NathanWalker I followed your steps above to pull in the latest changes, and subsequently followed the "Building with Webpack for release builds" steps. I can confirm I'm also experiencing the same call stack issue as @ghys when then running:

npm run start.android

...

Successfully deployed on device with identifier 'emulator-5554'.
JS: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
JS: ns-renderer: Maximum call stack size exceeded
JS: 
JS: RangeError: Maximum call stack size exceeded
JS:     at ScanSubscriber.Subscriber [as constructor] (file:///data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/Subscriber.js:31:24)
JS:     at new ScanSubscriber (file:///data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:79:16)
JS:     at ScanOperator.call (file:///data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:67:33)
JS:     at AnonymousSubject.Observable.subscribe (file:///data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/rxjs/Observable.js:42:22)
JS:     at ScanOperator.call (file:///data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:67:23)
JS:     at AnonymousSubject.Observable.subscribe (file:///data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/rxjs/Observable.js:42:22)
JS:     at ScanOperator.call (file:///data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:67:23)
JS:     at AnonymousSubject.Observable.subscribe (file:///data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/rxjs/Observable.js:42:22)
JS:     at ScanOperator.call (file:///data/data/com.yourdomain.appname/files/app/tns_modules/rxjs/operator/scan.js:67:23)
JS:     at AnonymousSubject.Observable.subscribe (file:///data/data/com.yourdomain.appname/files/app/tns_modules/nativescript-angular/node_modules/rxjs/Observable.js:42:22)

My package.json hasn't been altered:

{
  "name": "angular-seed-advanced",
  "version": "0.0.0",
  "description": "High-quality, modular starter (advanced seed) project for Angular 2 apps with statically typed build and AoT + NativeScript + Electron",
  "repository": {
    "url": "https://github.com/NathanWalker/angular-seed-advanced"
  },
  "scripts": {
    "build.desktop.mac": "rimraf desktop/mac/* && gulp desktop.mac",
    "build.desktop.windows": "rimraf desktop/windows/* && gulp desktop.windows",
    "build.desktop.linux": "rimraf desktop/linux/* && gulp desktop.linux",
    "build.dev": "gulp build.dev --color --env-config dev",
    "build.dev.watch": "gulp build.dev.watch --color",
    "build.docs": "npm run gulp -- build.docs --color",
    "build.e2e": "gulp build.e2e --color",
    "build.prod": "gulp build.prod --color --env-config prod --build-type prod",
    "build.prod.exp": "gulp build.prod.exp --color --env-config prod --build-type prod",
    "build.prod.aot": "gulp build.prod.exp --color --env-config prod --build-type prod",
    "build.test": "gulp build.test --color",
    "clean": "npm run clean.js && rm -rf node_modules typings && cd nativescript && rm -rf node_modules hooks lib platforms && cd .. && npm i",
    "clean.js": "gulp clean.all.src.js",
    "test.watch": "gulp test.watch --color",
    "generate.manifest": "gulp generate.manifest --color",
    "e2e": "protractor",
    "e2e.live": "protractor --elementExplorer",
    "git.merge": "git fetch upstream && git merge upstream/master --allow-unrelated-histories",
    "git.merge.legacy": "git fetch upstream && git merge upstream/master",
    "git.merge.preview": "git fetch upstream && git merge --no-commit upstream/master",
    "git.merge.preview.legacy": "git fetch upstream && git merge --no-commit upstream/master --allow-unrelated-histories",
    "git.prepare": "git add . && git add -f tools/install.js && git commit -m'setup'",
    "git.setup": "git init && git remote add upstream https://github.com/NathanWalker/angular-seed-advanced.git",
    "gulp": "gulp",
    "i18n": "ng-xi18n && gulp clean.i18n",
    "lint": "gulp tslint",
    "karma": "karma",
    "karma.start": "karma start",
    "postinstall": "gulp check.versions && gulp build.bundle.rxjs && npm prune && gulp webdriver && node tools/install.js",
    "reinstall": "npm cache clean && npm install",
    "serve.coverage": "gulp serve.coverage --color",
    "serve.dev": "gulp serve.dev --color --env-config dev",
    "serve.e2e": "gulp serve.e2e --color",
    "serve.prod": "gulp serve.prod --color --env-config prod",
    "serve.prod.exp": "gulp serve.prod.exp --color --env-config prod",
    "start": "gulp serve.dev --color",
    "start.deving": "gulp start.deving --color",
    "start.desktop": "gulp desktop && NODE_ENV=development electron ./dist/dev",
    "start.livesync.desktop": "gulp desktop && NODE_ENV=development gulp desktop.watch",
    "start.livesync.desktop.windows": "gulp desktop && SET NODE_ENV=development && gulp desktop.watch",
    "start.desktop.windows": "gulp desktop && SET NODE_ENV=development && electron ./dist/dev",
    "start.ios": "cd nativescript && npm i && tns emulate ios --disableNpmInstall",
    "start.livesync.ios": "cd nativescript && tns livesync ios --emulator --watch --disableNpmInstall",
    "start.livesync.ios.device": "cd nativescript && tns livesync ios --watch --disableNpmInstall",
    "start.android": "cd nativescript && npm i && tns emulate android --disableNpmInstall",
    "start.livesync.android": "cd nativescript && tns livesync android --emulator --watch --disableNpmInstall",
    "start.livesync.android.device": "cd nativescript && tns livesync android --watch --disableNpmInstall",
    "tasks.list": "gulp --tasks-simple --color",
    "test": "gulp test --color",
    "e2e.ci": "gulp build.prod --color && gulp build.js.e2e --color && gulp e2e --color",
    "tests.all": "npm test && npm run e2e.ci",
    "webdriver-start": "webdriver-manager start",
    "webdriver-update": "webdriver-manager update",
    "compodoc": "node_modules/.bin/compodoc -p src/client/tsconfig.json",
    "serve.compodoc": "node_modules/.bin/compodoc -s"
  },
  "author": "Minko Gechev <mgechev>",
  "contributors": [
    {
      "name": "Nathan Walker <NathanWalker>"
    }
  ],
  "license": "MIT",
  "devDependencies": {
    "@angular/compiler-cli": "~2.4.0",
    "@angular/platform-server": "~2.4.0",
    "@ngrx/store-devtools": "^3.2.2",
    "@types/async": "^2.0.32",
    "@types/browser-sync": "^0.0.34",
    "@types/express": "^4.0.33",
    "@types/gulp": "^3.8.32",
    "@types/gulp-filter": "^3.0.29",
    "@types/gulp-load-plugins": "^0.0.28",
    "@types/gulp-protractor": "^1.0.29",
    "@types/gulp-sass": "^0.0.29",
    "@types/gulp-util": "^3.0.29",
    "@types/jasmine": "^2.5.35",
    "@types/lodash": "^4.14.37",
    "@types/node": "^6.0.45",
    "@types/protractor": "^1.5.20",
    "@types/rimraf": "0.0.28",
    "@types/run-sequence": "^0.0.28",
    "@types/selenium-webdriver": "2.44.*",
    "@types/systemjs": "^0.19.31",
    "@types/yargs": "^0.0.34",
    "@types/zone.js": "^0.0.27",
    "async": "^2.1.1",
    "autoprefixer": "^6.5.1",
    "browser-sync": "^2.17.3",
    "codelyzer": "~2.0.0-beta.3",
    "compodoc": "^0.0.18",
    "connect-history-api-fallback": "^1.3.0",
    "cssnano": "^3.7.7",
    "deep-extend": "^0.4.1",
    "electron-connect": "^0.4.2",
    "electron-debug": "^1.0.0",
    "electron-prebuilt": "^1.2.1",
    "event-stream": "^3.3.4",
    "express": "~4.14.0",
    "express-history-api-fallback": "^2.0.0",
    "gulp": "^3.9.1",
    "gulp-atom-electron": "^1.6.1",
    "gulp-cached": "^1.1.0",
    "gulp-concat": "^2.6.0",
    "gulp-concat-css": "^2.3.0",
    "gulp-filter": "^4.0.0",
    "gulp-inject": "^4.1.0",
    "gulp-inline-ng2-template": "^4.0.0",
    "gulp-load-plugins": "^1.3.0",
    "gulp-newer": "^1.3.0",
    "gulp-plumber": "~1.1.0",
    "gulp-postcss": "^6.2.0",
    "gulp-progeny": "^0.3.1",
    "gulp-protractor": "^3.0.0",
    "gulp-replace": "^0.5.4",
    "gulp-sass": "^2.3.2",
    "gulp-sourcemaps": "2.2.0",
    "gulp-template": "^4.0.0",
    "gulp-tslint": "7.0.1",
    "gulp-typescript": "^3.0.2",
    "gulp-uglify": "^2.0.0",
    "gulp-util": "^3.0.7",
    "gulp-watch": "^4.3.10",
    "is-ci": "^1.0.9",
    "isstream": "^0.1.2",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "^2.7.0",
    "karma": "~1.3.0",
    "karma-chrome-launcher": "~2.0.0",
    "karma-coverage": "^1.1.1",
    "karma-jasmine": "~1.0.2",
    "karma-mocha-reporter": "^2.2.0",
    "karma-remap-istanbul": "^0.2.1",
    "merge-stream": "^1.0.0",
    "minimatch": "^3.0.3",
    "ngrx-store-freeze": "0.1.0",
    "open": "0.0.5",
    "protractor": "^4.0.9",
    "remap-istanbul": "^0.7.0",
    "rimraf": "^2.5.4",
    "run-sequence": "^1.2.2",
    "semver": "^5.3.0",
    "serve-static": "^1.11.1",
    "slash": "~1.0.0",
    "supports-color": "^3.1.2",
    "systemjs-builder": "0.15.33",
    "tildify": "^1.2.0",
    "traceur": "^0.0.111",
    "ts-node": "^1.4.3",
    "tslint": "~4.0.0",
    "typedoc": "^0.5.0",
    "typescript": "~2.0.9",
    "walk": "^2.3.9",
    "yargs": "^6.0.0"
  },
  "dependencies": {
    "@angular/common": "~2.4.0",
    "@angular/compiler": "~2.4.0",
    "@angular/core": "~2.4.0",
    "@angular/forms": "~2.4.0",
    "@angular/http": "~2.4.0",
    "@angular/platform-browser": "~2.4.0",
    "@angular/platform-browser-dynamic": "~2.4.0",
    "@angular/router": "~3.4.1",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^2.0.0",
    "@ngrx/store": "^2.2.1",
    "angulartics2": "^1.6.3",
    "core-js": "^2.4.1",
    "es-module-loader": "^1.0.0",
    "intl": "^1.2.5",
    "lodash": "^4.17.4",
    "minimatch": "^3.0.3",
    "ng2-translate": "^5.0.0",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.0.2",
    "systemjs": "0.19.41",
    "zone.js": "^0.7.2"
  }
}

I'm running this on a mac osx el capitan 10.11.2 (15C50). Node: v6.9.4 NPM: 3.10.10 TSC: 2.1.4

fourctv commented 7 years ago

@NathanWalker FYI, android now builds and runs fine, thanks for fixing that.

ponty7 commented 7 years ago

@fourctv Can you display all versions of you node_modules dependencies? I'm afraid because you have an older version of the seed, Android will work for you, but not for others who cloned at a later date. This is the problem you get when you don't have fixed versions in package.json, people cloning at later date get updated versions that might work at runtime. I bet if you ran 'npm update' it won't work for you either (don't do this, just saying).

fourctv commented 7 years ago

Here it goes @ponty7

Running El captain 10.11.6, using VSCode 1.8.1. Node: v6.9.1 NPM: 3.10.8 TSC: 2.1.4 TNS: 2.4.2

├── @angular/common@2.4.3
├── @angular/compiler@2.4.3
├── @angular/core@2.4.3
├── @angular/forms@2.4.3
├── @angular/http@2.4.3
├── @angular/platform-browser@2.4.3
├── @angular/platform-browser-dynamic@2.4.3
├── @angular/router@3.4.3
├── @ngrx/core@1.2.0
├── @ngrx/effects@2.0.0
├── @ngrx/store@2.2.1
├── @ngrx/store-devtools@3.2.2
├── @types/jasmine@2.5.40
├── angulartics2@1.6.3
├─┬ babel-traverse@6.12.0
│ ├─┬ babel-code-frame@6.20.0
│ │ ├─┬ chalk@1.1.3
│ │ │ ├── ansi-styles@2.2.1
│ │ │ ├── escape-string-regexp@1.0.5
│ │ │ ├─┬ has-ansi@2.0.0
│ │ │ │ └── ansi-regex@2.0.0
│ │ │ ├── strip-ansi@3.0.1
│ │ │ └── supports-color@2.0.0
│ │ └── js-tokens@2.0.0
│ ├── babel-messages@6.8.0
│ ├─┬ babel-runtime@6.20.0
│ │ ├── core-js@2.4.1
│ │ └── regenerator-runtime@0.10.1
│ ├─┬ debug@2.6.0
│ │ └── ms@0.7.2
│ ├── globals@8.18.0
│ └─┬ invariant@2.2.2
│   └── loose-envify@1.3.0
├─┬ babel-types@6.11.1
│ ├── esutils@2.0.2
│ └── to-fast-properties@1.0.2
├── babylon@6.8.4
├── base-64@0.1.0
├── bootstrap@3.3.7
├── es6-promise@3.3.1
├── es6-shim@0.35.2
├─┬ filewalker@0.1.2
│ └── fqueue@0.0.0
├── jquery@2.2.4
├── lazy@1.0.11
├── lodash@4.17.4
├─┬ nativescript-angular@1.4.1-2017-01-13-1201
│ └── nativescript-intl@0.0.10
├─┬ nativescript-dev-typescript@0.3.6
│ └─┬ nativescript-hook@0.2.1
│   ├── glob@6.0.4
│   └─┬ mkdirp@0.5.1
│     └── minimist@0.0.8
├── nativescript-telerik-ui@1.5.1
├── nativescript-theme-core@1.0.2
├── ng2-translate@5.0.0
├─┬ ngrx-store-freeze@0.1.0
│ └── deep-freeze@0.0.1
├── parse5@1.3.2
├── punycode@1.3.2
├── querystring@0.2.0
├── reflect-metadata@0.1.9
├─┬ rxjs@5.0.3
│ └── symbol-observable@1.0.4
├─┬ shelljs@0.7.6
│ ├─┬ glob@7.1.1
│ │ ├── fs.realpath@1.0.0
│ │ ├─┬ inflight@1.0.6
│ │ │ └── wrappy@1.0.2
│ │ ├── inherits@2.0.3
│ │ ├─┬ minimatch@3.0.3
│ │ │ └─┬ brace-expansion@1.1.6
│ │ │   ├── balanced-match@0.4.2
│ │ │   └── concat-map@0.0.1
│ │ ├── once@1.4.0
│ │ └── path-is-absolute@1.0.1
│ ├── interpret@1.0.1
│ └─┬ rechoir@0.6.2
│   └── resolve@1.2.0
├─┬ tns-core-modules@2.4.4
│ └── tns-core-modules-widgets@2.4.0
├── typescript@2.1.5
├── url@0.10.3
└── zone.js@0.7.5

Although I've cloned the seed awhile ago, I do keep it up to date, always merging and then updating my code accordingly. Also make sure you do:

cd nativescript
npm run clean
cd ..
npm run start.android

Are you having trouble with a fresh copy of the seed? That's something I try to do when I run in trouble after a merge. Ensure that it is not my code.

Now, re-reading your post, I noticed that you're saying you're having trouble on Windows 10. But you list your versions as OSX. That confused me... I run OSX here, and the trouble I was having before on android was caused by n2-config, which was removed in the latest seed. I can't say anything about Win 10, but OSx works like a charm.