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

npm install should provide diagnostics on error #8

Closed
pmuellr opened this issue Jul 31, 2014 · 8 comments
Closed

npm install should provide diagnostics on error #8

pmuellr opened this issue Jul 31, 2014 · 8 comments

Comments

@pmuellr
Copy link

pmuellr commented Jul 31, 2014

This package appears to die various sorts of death when you don't have ODBC/sql stuff pre-installed on your system. Eg, when trying to install on my mac, I see:

> ibm_db@0.0.1 preinstall ~/tmp/foo/bar/node_modules/ibm_db
> node-gyp configure build

  CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
In file included from ../src/odbc.cpp:25:
../src/odbc.h:29:10: fatal error: 'sqlcli1.h' file not found
#include <sqlcli1.h>
         ^
1 error generated.
make: *** [Release/obj.target/odbc_bindings/src/odbc.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
...
gyp ERR! command 
   "node" 
   "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" 
   "configure" 
   "build"
gyp ERR! cwd ~/tmp/foo/bar/node_modules/ibm_db
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok

Is there any way to "catch" that, to make it a little more understandable? Perhaps even tell the user where to get the package that needs to be pre-installed?

@toblender
Copy link

If you are still having troubles with this check out:

http://stackoverflow.com/questions/22183165/npm-install-odbc-fails-on-osx-and-ubuntu/25748907#25748907

@pmuellr
Copy link
Author

pmuellr commented Sep 9, 2014

If that's the best answer that can be provided for this situation, then perhaps the pre-/install script could be configured to print the URL when installing. And put the URL in the README.md as well, under a "Troubleshooting" header.

@mariobriggs
Copy link
Contributor

@pmuellr late reply i know. In 0.0.6 we upgraded the windows and linux install of the npm to download its dependencies (odbc/sql stuff). Still not there yet on Mac, since we dont yet have a dependent module bundle of the right size (but looks like that might get fixed soon). Until then updated the readme that calls out to install DB2Express-C first when on Mac (not yet a message during npm install :-( )

@mariobriggs
Copy link
Contributor

version 0.0.8 now automatically downloads required dependencies on Mac OS. Give it a try ( v 0.12 not supported as of today :-) )

@mil
Copy link

mil commented Mar 16, 2015

(osx 10.9.5) ibm_db throws:

~/D/r/projectregistrationapp > npm install
npm WARN package.json ProjectRegistration@0.0.1 No repository field.
npm WARN package.json ProjectRegistration@0.0.1 No README data
\
> ibm_db@0.0.8 install /Users/mil/Desktop/repos/projectregistrationapp/node_modules/ibm_db
> node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: EACCES, open '/Users/mil/Desktop/repos/projectregistrationapp/node_modules/ibm_db/installer/clidriver/msg/en_US.iso88591/db2adm.mo'

npm ERR! ibm_db@0.0.8 install: `node installer/driverInstall.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the ibm_db@0.0.8 install script.
npm ERR! This is most likely a problem with the ibm_db package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node installer/driverInstall.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls ibm_db
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/mil/Desktop/repos/projectregistrationapp
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.5.0-alpha-4
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/mil/Desktop/repos/projectregistrationapp/npm-debug.log
npm ERR! not ok code 0

any tips @mariobriggs

@avikalar
Copy link
Contributor

@mil EACESS error code means permission denied, does the user running the install command has sufficient privileges ? Can you send me the complete error trace, if there are any ?

@mil
Copy link

mil commented Mar 17, 2015

Problem had to do with old deps in the filesystem. rm node_modules && npm install fixes.

@avikalar
Copy link
Contributor

@mil: glad to know that your issue is fixed

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

6 participants