npm ERR! code 1
npm ERR! path /home/leonenco/Programs/upterm/node_modules/node-pty
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! make: Entering directory '/home/leonenco/Programs/upterm/node_modules/node-pty/build'
npm ERR! CXX(target) Release/obj.target/pty/src/unix/pty.o
npm ERR! make: Leaving directory '/home/leonenco/Programs/upterm/node_modules/node-pty/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! code 1
npm ERR! path /home/leonenco/Programs/upterm/node_modules/node-pty
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! make: Entering directory '/home/leonenco/Programs/upterm/node_modules/node-pty/build'
npm ERR! CXX(target) Release/obj.target/pty/src/unix/pty.o
npm ERR! make: Leaving directory '/home/leonenco/Programs/upterm/node_modules/node-pty/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
Related
I'm currently trying to run my Discord Bot on my Raspberry PI but I can't install Better-Sqlite3 on it. I don't really know what to do with all those errors or what they are telling me so I hope someone in here can help me with my problem. If you need any other information just let me know.
> better-sqlite3#7.1.2 install /home/pi/Discord Bot/node_modules/better-sqlite3
> prebuild-install || npm run build-release
prebuild-install WARN install No prebuilt binaries found (target=10.23.1 runtime=node arch=arm libc= platform=linux)
> better-sqlite3#7.1.2 build-release /home/pi/Discord Bot/node_modules/better-sqlite3
> node-gyp rebuild --release
make: Entering directory '/home/pi/Discord Bot/node_modules/better-sqlite3/build'
TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
/bin/sh: 1: Bot/node_modules/better-sqlite3/build/Release/lib.host:/home/pi/Discord: not found
/home/pi/Discord Bot/node_modules/better-sqlite3/deps/extract.js:8
process.on('unhandledRejection', (err) => { throw err; });
^
CwdError: ENOENT: Cannot cd into '/home/pi/Discord Bot/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3'
at fs.stat (/home/pi/Discord Bot/node_modules/tar/lib/mkdir.js:74:14)
at FSReqWrap.oncomplete (fs.js:153:21)
make: *** [deps/locate_sqlite3.target.mk:17: b857c92884e9598d609f6be182a2595df7a8e00f.intermediate] Error 1
rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
make: Leaving directory '/home/pi/Discord Bot/node_modules/better-sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.51-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/pi/Discord Bot/node_modules/better-sqlite3
gyp ERR! node -v v10.23.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3#7.1.2 build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3#7.1.2 build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-01-23T13_30_26_759Z-debug.log
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/Discord Bot/package.json'
npm WARN Discord Bot No description
npm WARN Discord Bot No repository field.
npm WARN Discord Bot No README data
npm WARN Discord Bot No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3#7.1.2 install: `prebuild-install || npm run build-release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3#7.1.2 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! /home/pi/.npm/_logs/2021-01-23T13_30_27_548Z-debug.log
npm start errors:
pi#raspberrypi:~/Discord Bot $ npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/pi/Discord Bot/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/Discord Bot/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-01-23T17_14_30_893Z-debug.log
Ok I found the solution to my problem. I had a "space" in the folder name of the bot that's why the programm to install better-sqlite3 couldn't find the folder and it crashed. I just removed the space and it worked completly fine.
I want to install the rpi-gpio module to control the pins over HTTP, but when I install this module it throws the following error:
pi#raspberrypi:~/Desktop $ sudo npm install rpi-gpio
epoll#0.1.17 install /home/pi/node_modules/rpi-gpio/node_modules/epoll
node-gyp rebuild
make: Entering directory '/home/pi/node_modules/rpi-gpio/node_modules/epoll/build'
CXX(target) Release/obj.target/epoll/src/epoll.o
In file included from ../src/epoll.cc:15:0:
../node_modules/nan/nan.h:328:47: error: 'REPLACE_INVALID_UTF8' is not a member of 'v8::String'
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
epoll.target.mk:84: recipe for target 'Release/obj.target/epoll/src/epoll.o' failed
make: *** [Release/obj.target/epoll/src/epoll.o] Error 1
make: Leaving directory '/home/pi/node_modules/rpi-gpio/node_modules/epoll/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.1.17-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/node_modules/rpi-gpio/node_modules/epoll
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! epoll#0.1.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the epoll#0.1.17 install script.
npm ERR! This is most likely a problem with the epoll 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 their info via:
npm ERR! npm owner ls epoll
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.1.17-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "rpi-gpio"
npm ERR! cwd /home/pi/Desktop
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/Desktop/npm-debug.log
npm ERR! not ok code 0
I am trying to install node-gyp, and I have this error :
I am using XCode 7.1, I tried to downgrade my version of NodeJS but it doesn't work.
I have been looking over on the internet for solutions but I cannot find any.
npm WARN package.json myk#1.0.0 No repository field.
npm WARN package.json myk#1.0.0 No README data
npm WARN package.json myk#1.0.0 No license field.
npm WARN package.json Dependency 'gulp' exists in both dependencies and devDependencies, using 'gulp#^3.5.6' from dependencies
contextify#0.1.14 install /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/node_modules/gulp-dom/node_modules/jsdom/node_modules/contextify
node-gyp rebuild
CXX(target) Release/obj.target/contextify/src/contextify.o
SOLINK_MODULE(target) Release/contextify.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/contextify.node] 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:269: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 15.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/node_modules/gulp-dom/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.12.6
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! contextify#0.1.14 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.14 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify 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 their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/npm-debug.log
I had the same problem and what worked for Emmanuel didn't work for me. In the end, this solved my problem:
cd /usr/local/lib
sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib
Originally found under this question
I found the answer :
$ npm install -g npm-check-updates
$ npm-check-updates -u
$ npm install
I am trying to install bcrypt using npm on redHat, I have it working on my Windows dev environment but it fails when I try to port it to the Unix test.
I am running npm intall bcrypt and recieving the following output:
$ ../../nodejs/bin/npm install bcrypt
npm WARN package.json party#0.0.0 No repository field.
npm WARN package.json party#0.0.0 No README data
-
> bcrypt#0.8.0 install /app/party/site/node_modules/bcrypt
> node-gyp rebuild
make: Entering directory `/app/party/site/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: execvp: g++: Not a directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 127
make: Leaving directory `/app/party/site/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/app/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 2.6.18-371.el5
gyp ERR! command "node" "/app/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/party/site/node_modules/bcrypt
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! bcrypt#0.8.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.0 install script.
npm ERR! This is most likely a problem with the bcrypt 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 their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.18-371.el5
npm ERR! command "/app/nodejs/bin/node" "/app/nodejs/bin/npm" "install" "bcrypt"
npm ERR! cwd /app/party/site
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /app/party/site/npm-debug.log
npm ERR! not ok code 0
I have been Googling for hours, but cannot work out why this is failing - please help!
Okay, thanks, I have got this working, the version of GCC I was running did not include g++, unfortunately I do not have root on this box so had to install easybuild and then use that to install a new version of GCC, then include that version in the PATH, after that the npm install bcrypt worked perfectly.
When I try to install now package it is giving me following error:
npm install now
npm WARN package.json Paint_HTML5_multi#0.3.0 No repository field.
npm WARN package.json Paint_HTML5_multi#0.3.0 No README data
npm http GET https://registry.npmjs.org/now
npm http 304 https://registry.npmjs.org/now
npm http GET https://registry.npmjs.org/node-proxy
npm http 304 https://registry.npmjs.org/node-proxy
npm WARN engine node-proxy#0.8.0: wanted: {"node":">=0.11.x","npm":">= 1.1.17"} (current: {"node":"v0.10.25","npm":"1.3.24"})
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
> node-proxy#0.8.0 install /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy
> node-gyp configure build
make: Entering directory `/home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy/build'
CXX(target) Release/obj.target/nodeproxy/src/node-proxy.o
make: g++: Command not found
make: *** [Release/obj.target/nodeproxy/src/node-proxy.o] Error 127
make: Leaving directory `/home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.8.0-35-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! node-proxy#0.8.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-proxy#0.8.0 install script.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-proxy
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.0-35-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "now"
npm ERR! cwd /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/npm-debug.log
npm ERR! not ok code 0
I'm getting the above error; how can I fix it?
You need build tools installed on your system. Based on the directory paths, I can assume you're using linux. On ubuntu, for example, you can install build tools like so: sudo apt-get install -y build-essential, otherwise view this README to see what tools are required to be installed.