I'm trying to npm i in my new Mac M1 and I get the below error. Appreciate if anyone can have a look and provide a solution.
I tried several solutions, but I ended up getting the same error.
npm WARN deprecated #hapi/pinpoint#2.0.0: Moved to 'npm install #sideway/pinpoint'
npm ERR! code 1
npm ERR! path /Users/lsdinduruwage/Documents/ZP-Projects/ZIP_Portal_V2/node_modules/bufferutil
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#16.13.0 | darwin | arm64
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/node-v16.13.0-headers.tar.gz
npm ERR! (node:23716) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS
connections and HTTPS requests insecure by disabling certificate verification.
npm ERR! (Use `node --trace-warnings ...` to show where the warning was created)
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.13.0/node-v16.13.0-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: aborted
npm ERR! gyp ERR! stack at connResetException (node:internal/errors:691:14)
npm ERR! gyp ERR! stack at TLSSocket.socketCloseListener (node:_http_client:407:19)
npm ERR! gyp ERR! stack at TLSSocket.emit (node:events:402:35)
npm ERR! gyp ERR! stack at node:net:687:12
npm ERR! gyp ERR! stack at TCP.done (node:_tls_wrap:580:7)
npm ERR! gyp ERR! System Darwin 22.2.0
npm ERR! gyp ERR! command "/Users/lsdinduruwage/.nvm/versions/node/v16.13.0/bin/node" "/Users/lsdinduruwage/Documents/ZP-Projects/ZIP_Portal_V2/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/lsdinduruwage/Documents/ZP-Projects/ZIP_Portal_V2/node_modules/bufferutil
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lsdinduruwage/.npm/_logs
/2023-01-04T06_09_45_617Z-debug.log
I tried npm i --force as well. I get the same error.
npm cache clean --force
or
npm cache clean
if it doesn't work then manually search the cache folder delete from ~/.npm . Maximum times it's done by npm cache clean It's work perfectly.
After that run
npm cache verify
After that install
npm install npm#latest -g
Related
This is the error I was getting while installing truffle through nom -g install truffle. Does someone knows how to fix this issue and also got error after installing ganache
npm ERR! code 1
npm ERR! path C:\Users\Jaimin Bhatt\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\secp256k1
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#17.3.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.10 found at "C:\Users\Jaimin Bhatt\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v17.3.1/node-v17.3.1-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v17.3.1/node-v17.3.1-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v17.3.1/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v17.3.1/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v17.3.1/win-arm64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v17.3.1/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v17.3.1/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v17.3.1/win-x86/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v17.3.1/win-x64/node.lib
npm ERR! gyp http 404 https://nodejs.org/download/release/v17.3.1/win-arm64/node.lib
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: EBUSY: resource busy or locked, open 'C:\Users\Jaimin Bhatt\AppData\Local\node-gyp\Cache\17.3.1\x64\node.lib'
npm ERR! gyp ERR! System Windows_NT 10.0.22557
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Jaimin Bhatt\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Jaimin Bhatt\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\secp256k1
npm ERR! gyp ERR! node -v v17.3.1
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jaimin Bhatt\AppData\Local\npm-cache\_logs\2022-02-19T12_09_18_933Z-debug-0.log
I found a solution that worked for me:
Install node-gyp: npm install -g node-gyp
Clear npm cache: npm cache clear --force
Finally hit npm i -g truffle
If it does not work, try installing this also:
npm install --global windows-build-tools
By the way, Im running Windows 10, with Node 16.14.0 and npm 8.3.1
Truffle is only compatible with npm < 7
you can try this:
npm install -g npm#6
and then install truffle
I am trying to install hubot-nagios4 module . Everytime i try installing with the command sudo npm install hubot-nagios4 --save i get the below error. I am currently using node version 6.9.1 and npm version 3.10.1.
unameit#Unameit:~/node/example2$ sudo npm install hubot-nagios4 --save
> contextify#0.1.15 install /home/unameit/node/example2/node_modules/contextify
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/unameit/.node-gyp/6.9.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/unameit/node/example2/node_modules/contextify/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1062:38)
gyp ERR! stack at emitNone (events.js:86:13)
gyp ERR! stack at TLSSocket.emit (events.js:185:7)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:586:8)
gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38)
gyp ERR! System Linux 3.13.0-74-generic
gyp ERR! command "/mnt/node/node-v6.9.1-linux-x86/bin/node" "/mnt/node/node-v6.9.1-linux-x86/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/unameit/node/example2/node_modules/contextify
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN example2#0.0.0 No repository field.
npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/mnt/node/node-v6.9.1-linux-x86/bin/node" "/usr/local/bin/npm" "install" "hubot-nagios4" "--save"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! contextify#0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.15 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 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 information on how to open an issue for this project with:
npm ERR! npm bugs contextify
npm ERR! Or if that isn't available, 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! /home/unameit/node/example2/npm-debug.log
Please assist
When trying to install memwatch using "npm install memwatch", I get this error:
I have CentOS6 with python 2.6.6 installed on server.
memwatch#0.2.2 install
/home/[[username]]/public_html/sockets/node_modules/memwatch
node-gyp rebuild
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT
gyp ERR! stack at errnoException (net.js:905:11)
gyp ERR! stack at Object.afterConnect as oncomplete
gyp ERR! System Linux 2.6.32-504.3.3.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd /home/[[username]]/public_html/sockets/node_modules/memwatch
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! memwatch#0.2.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the memwatch#0.2.2 install script.
npm ERR! This is most likely a problem with the memwatch 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 memwatch
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-504.3.3.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "memwatch"
npm ERR! cwd /home/[[username]]/public_html/sockets
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
Try
npm install memwatch-next
I think the old codebase is not updated to latest NPM/NodeJS
I am trying to install mmmagic with npm install and continue to get this error.
I have tried multiple versions of mmmagic as well as using node v0.10.40 & node v0.12.7, and reinstalling node-gyp.
I have cleared npm cache and destroyed the node_module folder multiple times.
Any ideas?
make: *** [Release/magic.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/XXXX/.nvm/v0.10.40/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:820:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "node" "/Users/XXXX/.nvm/v0.10.40/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/XXXX/Desktop/EdvisorIO/JJJJ/node_modules/mmmagic
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! mmmagic#0.3.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mmmagic#0.3.16 install script.
npm ERR! This is most likely a problem with the mmmagic 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 mmmagic
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 15.0.0
npm ERR! command "/Users/XXXX/.nvm/v0.10.40/bin/node" "/Users/XXXX/.nvm/v0.10.40/bin/npm" "install"
npm ERR! cwd /Users/XXXX/Desktop/EdvisorIO/JJJJ
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
When trying to install memwatch using "npm install memwatch", I get this error:
I have CentOS6 with python 2.6.6 installed on server.
memwatch#0.2.2 install
/home/[[username]]/public_html/sockets/node_modules/memwatch
node-gyp rebuild
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT
gyp ERR! stack at errnoException (net.js:905:11)
gyp ERR! stack at Object.afterConnect as oncomplete
gyp ERR! System Linux 2.6.32-504.3.3.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd /home/[[username]]/public_html/sockets/node_modules/memwatch
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! memwatch#0.2.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the memwatch#0.2.2 install script.
npm ERR! This is most likely a problem with the memwatch 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 memwatch
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-504.3.3.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "memwatch"
npm ERR! cwd /home/[[username]]/public_html/sockets
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
Try
npm install memwatch-next
I think the old codebase is not updated to latest NPM/NodeJS