Skip to content

Unable to build locally. Preview seems to work just fine. #5170

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
tusharkant15 opened this issue Nov 30, 2019 · 1 comment
Closed

Unable to build locally. Preview seems to work just fine. #5170

tusharkant15 opened this issue Nov 30, 2019 · 1 comment

Comments

@tusharkant15
Copy link

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.2.2
  • Cross-platform modules: 6.2.2
  • Android Runtime:
  • iOS Runtime:
  • Plugin(s):

Describe the bug
tns run android doesn't work. tns info also fails

The output of tns run android --log trace
Looking for project in '/home/tushar/Projects/TheLocalLunchbox/mobile'
Project directory is '/home/tushar/Projects/TheLocalLunchbox/mobile'.
Loading extensions.
System information:
[Object: null prototype] {
platform: 'linux',
shell: '/bin/bash',
os:
'Linux home-desktop 5.3.0-23-generic #25-Ubuntu SMP Tue Nov 12 09:22:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux\n',
procArch: 'x64',
nodeVer: null,
npmVer: null,
nodeGypVer: null,
nativeScriptCliVersion: null,
gitVer: '2.20.1',
dotNetVer: null,
javacVersion: '1.8.0_232-ea',
javaVersion: '1.8.0_232-ea',
javaPath: '/usr/lib/jvm/java-8-openjdk-amd64/bin/java',
adbVer: '1.0.41',
androidInstalled: true,
monoVer: null,
gradleVer: null,
isAndroidSdkConfiguredCorrectly: true,
xcodeVer: undefined,
xcodeprojLocation: null,
itunesInstalled: false,
cocoaPodsVer: undefined,
isCocoaPodsWorkingCorrectly: false,
isCocoaPodsUpdateRequired: false,
pythonInfo: null }
Error: Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal
at process.on (/home/tushar/.npm-global/lib/node_modules/nativescript/lib/nativescript-cli.js:22:22)
at /home/tushar/.npm-global/lib/node_modules/nativescript/node_modules/signal-exit/index.js:122:15
at Array.filter ()
at load (/home/tushar/.npm-global/lib/node_modules/nativescript/node_modules/signal-exit/index.js:120:21)
at module.exports (/home/tushar/.npm-global/lib/node_modules/nativescript/node_modules/signal-exit/index.js:35:5)
at Object. (/home/tushar/.npm-global/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. (/home/tushar/.npm-global/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)
spawn: /snap/node/2485/bin/node "/home/tushar/.npm-global/lib/node_modules/nativescript/lib/detached-processes/cleanup-process.js" "/home/tushar/.npm-global/lib/node_modules/nativescript/lib/bootstrap.js"
Shasum of file /home/tushar/Projects/TheLocalLunchbox/mobile/package.json is 1a40bc81394a1cf8e0cd48d235339da715f8a842
Exec npm view tns-core-modules versions --json
stdout:
stderr:
Command failed: npm view tns-core-modules versions --json

Error: Command failed: npm view tns-core-modules versions --json

at Errors.failWithOptions (/home/tushar/.npm-global/lib/node_modules/nativescript/lib/common/errors.js:147:28)
at Errors.fail (/home/tushar/.npm-global/lib/node_modules/nativescript/lib/common/errors.js:120:21)
at NodePackageManager.<anonymous> (/home/tushar/.npm-global/lib/node_modules/nativescript/lib/node-package-manager.js:98:30)
at Generator.throw (<anonymous>)
at rejected (/home/tushar/.npm-global/lib/node_modules/nativescript/lib/node-package-manager.js:11:65)
at process._tickCallback (internal/process/next_tick.js:68:7)

Initializing analytics statuses.
Analytics statuses: { TrackFeatureUsage: 'enabled', TrackExceptions: 'enabled' }
spawn: /snap/node/2485/bin/node "/home/tushar/.npm-global/lib/node_modules/nativescript/lib/services/analytics/analytics-broker-process.js" "/home/tushar/.npm-global/lib/node_modules/nativescript/lib/bootstrap.js"

The output of tns doctor is
✔ Getting environment information

No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
✖ Getting NativeScript components versions information...

The output of tns info is
✖ Getting NativeScript components versions information...

@rosen-vladimirov
Copy link
Contributor

Hey @tusharkant15 ,
It seems there's some problem with connection to npm on your side that causes the trouble. You can try executing manually the command that fails in CLI's code:

npm view tns-core-modules versions --json

And see what's the output.

In case you are working behind a proxy, you can set the required configuration to npm. More information is available here

As the issue does not seem related to NativeScript CLI itself, I'm closing it, but feel free to reopen it in case you have some concerns.

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