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 install NativeScript via NPM

See original GitHub issue

From @rjbain on March 1, 2016 22:37

I’m running

npm i -g nativescript

On OS X Yosemite v10.10.5 (14F1021)

And I’m getting this output:

$ npm i -g nativescript
npm WARN excluding symbolic link docs/stylesheets/hightlight.css -> ../../node_modules/highlight.js/src/styles/solarized_light.css
npm WARN deprecated lodash-node@2.4.1: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN excluding symbolic link docs/assets/ir_black.css -> ../../node_modules/highlight.js/src/styles/ir_black.css
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Resources -> Versions/Current/Resources
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Test Framework -> Versions/Current/Test Framework
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Versions/Current -> A
npm WARN excluding symbolic link docs/assets/ir_black.css -> ../../node_modules/highlight.js/src/styles/ir_black.css
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Resources -> Versions/Current/Resources
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Test Framework -> Versions/Current/Test Framework
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Versions/Current -> A
npm WARN excluding symbolic link docs/stylesheets/hightlight.css -> ../../node_modules/highlight.js/src/styles/solarized_light.css
/usr/local/bin/tns -> /usr/local/lib/node_modules/nativescript/bin/nativescript.js
/usr/local/bin/nativescript -> /usr/local/lib/node_modules/nativescript/bin/nativescript.js

> fibers@1.0.6 install /usr/local/lib/node_modules/nativescript/node_modules/fibers
> node build.js || nodejs build.js

`darwin-x64-v8-3.28` exists; testing
Binary is fine; exiting

> bufferutil@1.0.1 install /usr/local/lib/node_modules/nativescript/node_modules/bufferutil
> node ./build.js

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/usr/local/lib/node_modules/nativescript/node_modules/bufferutil/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
make: Leaving directory '/usr/local/lib/node_modules/nativescript/node_modules/bufferutil/build'
Installed in `/usr/local/lib/node_modules/nativescript/node_modules/bufferutil/bin/darwin-x64-v8-3.28/bufferutil.node`

> ref@1.1.3 install /usr/local/lib/node_modules/nativescript/node_modules/ref
> node ./build.js

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/usr/local/lib/node_modules/nativescript/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
  SOLINK_MODULE(target) Release/binding.node
make: Leaving directory '/usr/local/lib/node_modules/nativescript/node_modules/ref/build'
Installed in `/usr/local/lib/node_modules/nativescript/node_modules/ref/bin/darwin-x64-v8-3.28/binding.node`

> ffi@2.0.0 install /usr/local/lib/node_modules/nativescript/node_modules/ffi
> node ./build.js

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/usr/local/lib/node_modules/nativescript/node_modules/ffi/build'
  CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/types.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/closures.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi64.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/darwin.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/darwin64.o
  LIBTOOL-STATIC Release/libffi.a
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
deps/libffi/ffi.target.mk:165: recipe for target 'Release/libffi.a' failed
make: *** [Release/libffi.a] Error 1
make: Leaving directory '/usr/local/lib/node_modules/nativescript/node_modules/ffi/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/nativescript/node_modules/ffi
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
Build failed
/usr/local/lib
└── (empty)

npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "i" "-g" "nativescript"
npm ERR! node v0.12.7
npm ERR! npm  v3.7.5
npm ERR! code ELIFECYCLE

npm ERR! ffi@2.0.0 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ffi@2.0.0 install script 'node ./build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ffi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ffi
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ffi
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/me/npm-debug.log
npm ERR! code 1

Thank you! Rob

Copied from original issue: NativeScript/NativeScript#1681

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
jvzanattacommented, Jul 17, 2016

Solved using the instructions on this website

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs

0reactions
Plamen5kovcommented, May 17, 2016

Hi @rjbain, What is your node version ? You can check with:

nove --version
Read more comments on GitHub >

github_iconTop Results From Across the Web

can't npm install nativescript · Issue #7515 - GitHub
Try doing npm i -g nativescript@latest or npm i -g nativescript@5.4.2 Based on your error; it appears you are getting v2.5.0 and a...
Read more >
nativescript - npm
Install the NativeScript CLI. The NativeScript CLI is available for installing as an npm package. In the command prompt, run the following ...
Read more >
Unable to install Nativescript cli - node.js - Stack Overflow
Found the reason: In .npmrc there was a setting: always-auth=true. After setting this to false, the issue was solved. I hope this doesn't...
Read more >
Environment Setup - NativeScript Docs
This page will walk through installing everything you need to build your first NativeScript app. Windows + Android #. You will need Node,...
Read more >
can't install Native script - Google Groups
I'm having a similar issue. The android command is not a command. The path is set as specified in the documentation. Furthermore, I...
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