New nativescript+ng app created with version 2.2.1 of Nativescipt crashes on start
See original GitHub issueI’ve just tried to create a new app with angular 2 support using these commands:
tns create ProvaNg --ng
tns platform add ios
tns run ios --emulator
but I’m getting these error when the app starts in the emulator:
Sep 10 21:08:38 Stefanos-MacBook-Pro ProvaNg[17597]: 1 0x100d14c67 -[TNSRuntime executeModule:]
Sep 10 21:08:38 Stefanos-MacBook-Pro ProvaNg[17597]: 2 0x100947702 main
Sep 10 21:08:38 Stefanos-MacBook-Pro ProvaNg[17597]: 3 0x1046a192d start
Sep 10 21:08:38 Stefanos-MacBook-Pro ProvaNg[17597]: 4 0x1
Sep 10 21:08:38 Stefanos-MacBook-Pro ProvaNg[17597]: file:///app/tns_modules/zone.js/dist/zone-node.js:670:21: JS ERROR Error: Could not find module 'timers'. Computed path '/Users/stefano/Library/Developer/CoreSimulator/Devices/0C77458C-EC39-4E4C-8FAD-8F19060E5199/data/Containers/Bundle/Application/77A25270-A3EC-4274-A4F8-84FA63CBD02A/ProvaNg.app/app/tns_modules/timers'.
Sep 10 21:08:38 Stefanos-MacBook-Pro com.apple.CoreSimulator.SimDevice.0C77458C-EC39-4E4C-8FAD-8F19060E5199.launchd_sim[11246] (UIKitApplication:org.nativescript.ProvaNg[0x92a4][17597]): Service exited due to signal: Segmentation fault: 11
I’m currently running nativescript 2.2.1.
I’ve got a previous app generated some days ago and everything worked but the package.json is quite different.
I’ve tried to copy the old dependencies but I still get the same error…
Here’s the package.json file generated today:
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.ProvaNg",
"tns-ios": {
"version": "2.2.1"
}
},
"dependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/platform-server": "2.0.0-rc.4",
"@angular/router": "3.0.0-beta.2",
"@angular/router-deprecated": "2.0.0-rc.2",
"nativescript-angular": "^0.3.0",
"reflect-metadata": "^0.1.5",
"rxjs": "5.0.0-beta.6",
"tns-core-modules": "2.2.1",
"zone.js": "^0.6.12"
},
"devDependencies": {
"nativescript-dev-typescript": "^0.3.2",
"typescript": "^1.8.10"
}
}
I was running node 6 so I downgraded to the node 4 LTS version suggested on nativescript site but still without success…
Any suggestion I can use to fix the problem?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:11 (3 by maintainers)
Top Results From Across the Web
IOS App Crashes in simulator after updating Nativescript from ...
I migrated my nativescript application from 6.5.1 to 8.2 locally, my project is building fine when I do "tns run ios" ,it installs...
Read more >App Crash Issue in IOS 14.0 | Apple Developer Forums
Our Nativescript app is also facing issues. Upon updating to iOS 14, a lot of our clients can't use it while others can....
Read more >I updated my app to 3.0 and so can you! - The NativeScript Blog
Start your engines. OK, here is what you have to do to update your apps. First, if your project is a TypeScript-based project,...
Read more >Upgrading tips for Angular 10 projects - The NativeScript Blog
1. Update package.json · Updated package. · Remove platforms version from nativescript section, but keep id property. · Delete webpack. · Run npm ......
Read more >Add Basic Crash Reporting to Your NativeScript App
nativescript.json file has "crashlytics": true and "crash_reporting": false noted. This enables Crashlytics and disables the older Firebase ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It appears the problem is in the
zone.js
npm module.I am able to get working again with these steps:
Thanks ross-bradbury and SittingFox. Using 0.6.12 seemed to have fixed the issue for me too.
For anyone else who tripped on this, probably safer to change your ‘package.json’ and staple the zone.js version at 0.6.12.