Revert back to 0.6.17 zone.js
I get this error when trying to build my app:
Sep 10 12:27:29 Robs-MBP client[10264]: 3 0x10b85392d start
Sep 10 12:27:29 Robs-MBP client[10264]: **file:///app/tns_modules/zone.js/dist/zone-node.js:670:21: JS ERROR Error: Could not find module 'timers'**. Computed path '/Users/roblav96/Library/Developer/CoreSimulator/Devices/F0820311-799D-4113-AE34-3C3AAD669E9F/data/Containers/Bundle/Application/B5D1EF38-393A-4AA2-B204-C03023FC42D6/client.app/app/tns_modules/timers'.
Sep 10 12:27:29 Robs-MBP com.apple.CoreSimulator.SimDevice.F0820311-799D-4113-AE34-3C3AAD669E9F.launchd_sim[2436] (UIKitApplication:com.roblav96.sandbox[0x4bbd][10264]): Service exited due to signal: Segmentation fault: 11
Checking npm info zone.js:
'0.6.16': '2016-08-22T17:29:49.463Z',
'0.6.17': '2016-08-22T22:41:52.196Z',
'0.6.18': '2016-09-10T16:04:53.468Z',
'0.6.19': '2016-09-10T16:06:17.234Z' },
I revert back to 0.6.17 and everything works fine again.
ditto.. I'm not sure whether the zone.js team would necessarily care about code changes that would break compatibility with NativeScript, but I added an issue in their repo that describes the problem and its origin.
In the meanwhile, we're stuck with either:
This looks related to nativescript-angular issue #144
tns create ExampleProject --ng
cd ExampleProject
# revert version of "zone.js" in "nativescript-angular":
cd node_modules/nativescript-angular
npm uninstall zone.js --save
npm install [email protected] --save
# revert version of "zone.js" in "ExampleProject":
# (note: its "package.json" doesn't list this module, so it must be listed under "peerDependencies" in one of the listed "dependencies".. didn't bother to track it down)
cd ../..
npm uninstall zone.js
npm install [email protected]
# remove "tns_modules" (if they already exist):
rm -rf platforms
# add "android" as a target plaform (if it isn't already):
tns platform add android
# rebuild and do a test run:
tns run android
update: I was curious.. and learned something new..
the module: @angular/core is a "scoped package"
it's "package.json" includes "zone.js" in its "peerDependencies".
when npm installs @angular/core, the peer is added adjacent to the parent "scope" (ie: as a peer to @angular), which is the 2nd instance of "zone.js" reverted in the above example.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
ditto.. I'm not sure whether the zone.js team would necessarily care about code changes that would break compatibility with NativeScript, but I added an issue in their repo that describes the problem and its origin.
In the meanwhile, we're stuck with either: