Skip to content
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

Installation of module fails #104

Closed
focussing opened this issue Mar 1, 2018 · 4 comments
Closed

Installation of module fails #104

focussing opened this issue Mar 1, 2018 · 4 comments

Comments

@focussing
Copy link

Sorry!
What am I doing wrong?

macbook:node raymond$ npm -v
5.6.0

macbook:node raymond$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

macbook:node raymond$ npm install better-sqlite3

> [email protected] install /Users/raymond/stack/node/node_modules/integer
> node tools/install

  CXX(target) Release/obj.target/integer/src/integer.o
  SOLINK_MODULE(target) Release/integer.node

> [email protected] install /Users/raymond/stack/node/node_modules/better-sqlite3
> node deps/install

==> cwd: /Users/raymond/stack/node/node_modules/better-sqlite3
==> /Users/raymond/stack/node/node_modules/lzz-gyp/lzz-compiled/osx -hx hpp -sx cpp -k BETTER_SQLITE3 -d -hl -sl -e ./src/better_sqlite3.lzz
==> cwd: /Users/raymond/stack/node/node_modules/better-sqlite3
==> node-gyp rebuild
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3210000/sqlite3.c
  TOUCH Release/obj.target/deps/action_before_build.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3210000/sqlite3.o
  LIBTOOL-STATIC Release/sqlite3.a
Usage: /usr/local/bin/libtool [OPTION]... [MODE-ARG]...
Try 'libtool --help' for more information.
libtool:   error: unrecognised option: '-static'
make: *** [Release/sqlite3.a] Error 1
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:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/raymond/stack/node/node_modules/better-sqlite3
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
Error: exit code 1
    at ChildProcess.<anonymous> (/Users/raymond/stack/node/node_modules/lzz-gyp/lib/exec.js:19:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node deps/install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/raymond/.npm/_logs/2018-03-01T08_40_06_263Z-debug.log
@JoshuaWise
Copy link
Member

I believe your node-gyp toolchain is using the wrong version of some dependency. See this comment which may help you

@focussing
Copy link
Author

Hm, it seems that the version I currently have is okay...

macbook:~ raymond$ libtool --version
libtool (GNU libtool) 2.4.6
Written by Gordon Matzigkeit, 1996

@vieiralc
Copy link

This worked for me:

  1. First, I had Visual C++ 2013 installed, then configured globally by running npm config set msvs_version 2013 --global
  2. Then I ran an installation of node-gyp by running npm install node-gyp -g node-gyp
  3. Finally, I installed Sqlite3 by running npm install sqlite3

Find it here: https://stackoverflow.com/questions/40461439/error-installing-sqlite3-in-node-js

@ohager
Copy link

ohager commented May 9, 2018

@vieiralc This works me (windows), but @focussing is on a Mac.

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

No branches or pull requests

4 participants