Skip to content

Any npm view command under Nativescript CLI errors with SIGINT #5186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iamajoe opened this issue Dec 17, 2019 · 2 comments
Closed

Any npm view command under Nativescript CLI errors with SIGINT #5186

iamajoe opened this issue Dec 17, 2019 · 2 comments

Comments

@iamajoe
Copy link

iamajoe commented Dec 17, 2019

Environment

  • OS: Linux Ubuntu 18
  • CLI: 6.22

Describe the bug
Running tns commands like info or doctor errors on any command with npm view. If I run those commands locally, without the tns wrapper, they work.

To Reproduce

  1. Run tns info --log trace
  2. It errors with Command failed: npm view nativescript dist-tags --json

Expected behavior
Run all smooth without any error.

Additional context
Android is set with ANDROID_HOME, ANDROID_SDK_ROOT, ANDROID_SDK_HOME, ANDROID_EMULATOR, ANDROID_AVD_HOME and JAVA_HOME. Emulators have been created and sdk have accepted licenses.

On the next log I ran with oracle java but I also tried openjdk and the same happens.

Here is the terminal log file:

$ tns info --log trace
Looking for project in '/home/foobar/local/nativescript101'
Project directory is '/home/foobar/local/nativescript101'.
Loading extensions.
System information:
{
  "platform": "linux",
  "shell": "/bin/bash",
  "os": "Linux generic NativeScript/NativeScript#81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux\n",
  "procArch": "x64",
  "nodeVer": null,
  "npmVer": null,
  "nodeGypVer": null,
  "nativeScriptCliVersion": null,
  "gitVer": "2.17.1",
  "dotNetVer": null,
  "javacVersion": "1.8.0_181",
  "javaVersion": "1.8.0_181",
  "javaPath": "/usr/lib/jvm/java-8-oracle/bin/java",
  "adbVer": "1.0.41",
  "androidInstalled": true,
  "monoVer": "4.6.2",
  "gradleVer": "4.4.1",
  "isAndroidSdkConfiguredCorrectly": true,
  "xcodeprojLocation": null,
  "itunesInstalled": false,
  "isCocoaPodsWorkingCorrectly": false,
  "isCocoaPodsUpdateRequired": false,
  "pythonInfo": null
}
Current CLI version:  6.3.0-2019-12-17-095433-14048
Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.
The stackTrace of the location trying to handle SIGINT is:
at process.on (/home/foobar/npm/lib/node_modules/nativescript/lib/nativescript-cli.js:24:28)
at /home/foobar/npm/lib/node_modules/nativescript/node_modules/signal-exit/index.js:122:15
at Array.filter (<anonymous>)
at load (/home/foobar/npm/lib/node_modules/nativescript/node_modules/signal-exit/index.js:120:21)
at module.exports (/home/foobar/npm/lib/node_modules/nativescript/node_modules/signal-exit/index.js:35:5)
at Object.<anonymous> (/home/foobar/npm/lib/node_modules/nativescript/node_modules/proper-lockfile/lib/lockfile.js:296:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/foobar/npm/lib/node_modules/nativescript/node_modules/proper-lockfile/index.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
:wqspawn: /snap/node/2485/bin/node "/home/foobar/npm/lib/node_modules/nativescript/lib/detached-processes/cleanup-process.js" "/home/foobar/npm/lib/node_modules/nativescript/lib/bootstrap.js"
Initializing analytics statuses.
Analytics statuses:  { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled'  }
⠙ Getting NativeScript components versions information...Exec npm view nativescript  dist-tags --json
stdout:
stderr:
Command failed: npm view nativescript  dist-tags --json
 
✖ Getting NativeScript components versions information...
 
$ npm view nativescript dist-tags --json
{
  "latest": "6.2.2",
  "next": "6.3.0-2019-12-16-135153-14045",
  "rc": "6.3.0-2019-12-17-095433-14048",
  "latest-3": "3.4.4",
  "dev-feature": "5.1.0-debug-hmr-2018-11-29-1",
  "dev-feature-2": "5.1.1-2019-02-06-12904",
  "patch": "6.2.1-2019-10-30-150452-13972",
  "webpack": "6.0.0-2019-06-19-13454",
  "mustang": "6.3.0-mustang-ci"
}
@NickIliev NickIliev transferred this issue from NativeScript/NativeScript Dec 18, 2019
@PatrickLohan
Copy link

After checking my output, yes, you have a problem with, at least, node and maybe other things too. Have you tried installing nvm from their github repo? Makes it super easy to change between node versions and then you can see the difference between traces.

@iamajoe
Copy link
Author

iamajoe commented Dec 18, 2019

I'm closing this down. With nvm, the same versions (node: 10.16.1, npm: 6.9.0) it works. So definitely a setup thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants