_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 [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: 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 [email protected]: 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
> [email protected] 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
> [email protected] 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`
> [email protected] 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`
> [email protected] 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! [email protected] install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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_
Hi @rjbain,
It looks like your system is missing some of the required tools for building native dependencies. I've seen such errors when homebrew is messing the libtool installation. There are two options here:
Hope this helps.
Thank you, @rosen-vladimirov. I tried following the instructions you linked to, but it didn't seem to help. Here's what happened:
$ brew unlink libtool
Unlinking /usr/local/Cellar/libtool/2.4.6... 7 symlinks removed
me at desktop in ~
$ 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 [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: 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 [email protected]: 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
> [email protected] 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
> [email protected] 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`
> [email protected] 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`
> [email protected] 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! [email protected] install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Hi @rjbain
Looking through the logcat:
gyp ERR! node -v v0.12.7
You can see the node version is 0.12.7, try installing node 4.x.x as @rosen-vladimirov suggested and try again. You can check what version of node are you running by running the command
node --version
@rjbain as we have not heard back from you, I'm closing this issue. Feel free to reopen it in case you still face the problem.
Hi @rjbain,
What is your node version ? You can check with:
nove --version
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
Most helpful comment
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