question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot run emulator with tns as devDependency

See original GitHub issue

I’m trying to setup the dev environment for other developers so that they don’t have to install modules globally. I am able to install nativescript as a dev dependency and use npm scripts to use the local binary. Building the ios app works fine. I’m not able to run the emulator unfortunately. Here’s an output of the logs

** BUILD SUCCEEDED **

Revert typescript version to beta
Project successfully built
Using  /Users/Jeremiah/Projects/worklife/mobile-app/AppName/platforms/ios/build/emulator/AppName.app
Starting iOS Simulator
Feb 16 14:16:22 Jeremiahs-MacBook-Pro AppName[72734]: 1   0x73d76 -[TNSRuntime executeModule:]

Feb 16 14:16:22 Jeremiahs-MacBook-Pro AppNAme[72734]: 2   0x3541e main
Feb 16 14:16:22 Jeremiahs-MacBook-Pro AppNAme[72734]: 3   0x39dea21 start
Feb 16 14:16:22 Jeremiahs-MacBook-Pro AppName[72734]: 4   0x1
Feb 16 14:16:22 Jeremiahs-MacBook-Pro AppName[72734]: undefined: JS ERROR Error: Failed to find module 'stream' relative to 'file:///app/tns_modules/xml/lib/xml.js'. Computed path: 'app/tns_modules/stream.js'.
Feb 16 14:16:22 Jeremiahs-MacBook-Pro com.apple.CoreSimulator.SimDevice.7EC1FE7F-61C4-494C-ABDD-7E6D32BCE45A.launchd_sim[71860] (UIKitApplication:com.progress.ios.AppName[0x60b5][72734]): Service exited due to signal: Segmentation fault: 11

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
PeterStaevcommented, Jun 7, 2016

Actually I spoke too soon. Here is the scenario i’m testing:

  1. I have a sample app created with the global tns
  2. In the folder of the app I run npm install nativescript --save-dev
  3. In the folder of the app I run node_modules\.bin\tns deploy android. The build completes successful but when run on android the app throws the error: image I opened the package.json of the app and seems the install of nativescript also put the tns-core-modules in the devDependencies section (although it was already present in the dependencies section before starting with step 2). I manually removed them from there, deleted the platforms folder and did again step 3 above. Again build completes w/o problems but when deployed the following error pops up: image
1reaction
dtopuzovcommented, May 5, 2017

@PeterStaev @donangel @palavrov It looks issue is fixed in {N} 3.0.0.

Testing with this steps:

tns create TestApp (global tns)
cd TestApp
npm install nativescript --save-dev
node_modules/.bin/tns run android -> looks OK
node_modules/.bin/tns run ios -> looks OK

Feel free to reopen if you still encounter some issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NativeScript - cmd tns run android issue - Stack Overflow
Cannot find connected devices. Emulator start failed with: No emulator image available for device identifier 'undefined'. To list currently ...
Read more >
Configure hardware acceleration for the Android Emulator
Discover how the Android Emulator can use hardware acceleration features to improve performance.
Read more >
Development Workflow - NativeScript Docs
Runs your project on all connected devices or in native emulators for the selected platform. The command will prepare, build and deploy the...
Read more >
failed with code 1
Xcodeで「linker command failed with exit code 1 」エラーが出た際は、Unityで書き出しする際に「Build And Run」を押す. 1 works fine with stdc++17, but failed.
Read more >
Setting Up Android Emulators for NativeScript Development
Then we instruct the tns command to use the given Genymotion device instead of the normal Android emulator. Previously we also defined an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found