Closed greezlu closed 7 years ago
Can you paste the output from the terminal? npm doesn't everything in its log.
If I had to guess it's that you are missing a compiler but I can't say for sure.
I am seeing this. charlie:~/mobile/etl$ npm install iconv
iconv@2.2.3 install /home/app/mobile/etl/node_modules/iconv node-gyp rebuild
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-78-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/app/mobile/etl/node_modules/iconv
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN etl@1.0.0 No repository field.
npm ERR! Linux 4.4.0-78-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "iconv"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! iconv@2.2.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iconv@2.2.3 install script 'node-gyp rebuild'.
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 iconv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs iconv
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls iconv
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/app/mobile/etl/npm-debug.log
Similar errors here with NPM version 3.10.8 and Node version 6.9.1
I fixed it with 'sudo ln -s /usr/bin/nodejs /usr/bin/node'
Debian or Ubuntu? There's a nodejs-legacy package that maintains the symlink for you.
At any rate, since the OP didn't follow up, I'll go ahead and close this out.
In my case.. Windows. ..and the errors were also looking for Python. I'll try again at a later time if the install works like other npm packages without having to modify my node installation or environment variables.
@designerx2 Please file a new issue and include the full build output if it's still not working for you. Note that iconv is a native module so you need the prerequisites from https://github.com/nodejs/node-gyp to build it.
npm-debug.txt