I faced issue while was trying to install sharp module on ubuntu server.
I tried to install it to my project folder but had no success there.
I had a guess that this might happen due to some conflicts with current modules. After that I tried to install it to the new folder with no modules in it, but result was the same.
The issue flow is next. I try to install sharp module, then it stuck in this state (I waited for around an hour and nothing changed).
(##################) ⠼ reify:sharp: timing reifyNode:node_modules/semver Completed in 145ms
After that I pressed ctrl+c and here is the error that I got
root#ubuntu-front:/var/tmp/tes# npm i sharp
npm ERR! path /var/tmp/tes/node_modules/sharp
npm ERR! command failed
npm ERR! signal SIGINT
npm ERR! command sh /tmp/install-4252fa98.sh
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.13.2/libvips-8.13.2-linux-x64.tar.br
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-10-12T12_56_38_692Z-debug-0.log
And here is output from the dump file
288 info run sharp#0.31.1 install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
289 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 275ms
290 timing auditReport:getReport Completed in 278ms
291 silly audit report {}
292 timing auditReport:init Completed in 0ms
293 timing reify:audit Completed in 279ms
294 info run sharp#0.31.1 install { code: null, signal: 'SIGINT' }
295 timing reify:rollback:createSparse Completed in 34ms
296 timing reify:rollback:retireShallow Completed in 0ms
297 timing command:i Completed in 21196ms
298 verbose stack Error: command failed
298 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/lib/index.js:63:27)
298 verbose stack at ChildProcess.emit (node:events:513:28)
298 verbose stack at maybeClose (node:internal/child_process:1093:16)
298 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
299 verbose pkgid sharp#0.31.1
300 verbose cwd /var/tmp/tes
301 verbose Linux 5.15.0-48-generic
302 verbose node v16.17.0
303 verbose npm v8.15.0
304 error path /var/tmp/tes/node_modules/sharp
305 error command failed
306 error signal SIGINT
307 error command sh /tmp/install-4252fa98.sh
308 error sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.13.2/libvips-8.13.2-linux-x64.tar.br
309 verbose exit 1
310 timing npm Completed in 21266ms
311 verbose unfinished npm timer reify 1665579398761
312 verbose unfinished npm timer reify:build 1665579400052
313 verbose unfinished npm timer build 1665579400052
314 verbose unfinished npm timer build:deps 1665579400052
315 verbose unfinished npm timer build:run:install 1665579400057
316 verbose unfinished npm timer build:run:install:node_modules/sharp 1665579400057
317 verbose code 1
318 error A complete log of this run can be found in:
318 error /root/.npm/_logs/2022-10-12T12_56_38_692Z-debug-0.log
I found some similar issues in the Internet but all of them were slightly different and suggested solutions didn't help in my case.
Here are the versions
# node -v
v16.17.0
# npm -v
8.15.0
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
Related
I met this problem when I use react.
In terminal
npx create-react-app myproject
Error message
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry/,npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND proxy.company.com
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/****/.npm/_logs/2022-12-01T16_39_36_991Z-debug-0.log
log file
26 verbose logfile logs-max:10 dir:/Users/****/.npm/_logs
27 verbose logfile /Users/****/.npm/_logs/2022-12-01T16_39_36_991Z-debug-0.log
28 timing npm:load:logFile Completed in 2ms
29 timing npm:load:timers Completed in 0ms
30 timing npm:load:configScope Completed in 0ms
31 timing npm:load Completed in 16ms
32 silly logfile start cleaning logs, removing 5 files
33 timing arborist:ctor Completed in 1ms
34 timing arborist:ctor Completed in 0ms
35 silly logfile done cleaning log files
36 timing command:exec Completed in 70053ms
37 verbose type system
38 verbose stack FetchError: request to https://registry/,npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND proxy.company.com
38 verbose stack at ClientRequest.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
38 verbose stack at ClientRequest.emit (node:events:513:28)
38 verbose stack at onerror (/opt/homebrew/lib/node_modules/npm/node_modules/agent-base/dist/src/index.js:117:21)
38 verbose stack at callbackError (/opt/homebrew/lib/node_modules/npm/node_modules/agent-base/dist/src/index.js:136:17)
Already I uninstall node, npm and reinstall it.
But it isn't success create-react-app.
My node version : 19.2.0
My npm version : 8.19.3
What happened in my computer .. 🙀
run this command
npm config set registry http://registry.npmjs.org/
need to use http not https
I cannot install firebase via npm install -g firebase.
I receive the following error that I could not find a solution for:
The issue seem to be relatedd to core-js & protobufjs which cannot be postinstall.
Note: I did reinstall node.js multiple times already - without any luck.
51 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 374ms
52 timing auditReport:getReport Completed in 377ms
53 silly audit report {}
54 timing auditReport:init Completed in 0ms
55 timing reify:audit Completed in 377ms
56 timing reifyNode:node_modules/#firebase/polyfill/node_modules/core-js Completed in 1368ms
57 timing reifyNode:node_modules/core-js Completed in 1470ms
58 timing reify:unpack Completed in 1470ms
59 timing reify:unretire Completed in 0ms
60 timing build:queue Completed in 1ms
61 info run core-js#3.18.1 postinstall node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"
62 info run core-js#3.6.5 postinstall node_modules/#firebase/polyfill/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"
63 info run core-js#3.18.1 postinstall { code: 127, signal: null }
64 info run core-js#3.6.5 postinstall { code: 127, signal: null }
65 timing reify:rollback:createSparse Completed in 338ms
66 timing reify:rollback:retireShallow Completed in 31ms
67 timing command:install Completed in 2501ms
68 verbose stack Error: command failed
68 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs2\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:64:27)
68 verbose stack at ChildProcess.emit (node:events:390:28)
68 verbose stack at maybeClose (node:internal/child_process:1064:16)
68 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
69 verbose pkgid core-js#3.18.1
70 verbose cwd C:\Users\chmit_000
71 verbose Windows_NT 10.0.19042
72 verbose argv "C:\\Program Files\\nodejs2\\node.exe" "C:\\Program Files\\nodejs2\\node_modules\\npm\\bin\\npm-cli.js" "install" "core-js"
73 verbose node v16.10.0
74 verbose npm v7.24.0
75 error code 127
76 error path C:\Users\chmit_000\node_modules\core-js
77 error command failed
78 error command bash -c node -e "try{require('./postinstall')}catch(e){}"
79 error /bin/bash: node: command not found
80 verbose exit 127
The package meant for global installation is firebase-tools. That's the CLI used for deploying your app (or parts of it) to firebase, as well as performing other administrative tasks. The firebase package is the library used for accessing firebase backend/cloud functions in a web/mobile project.
If you're looking to install the CLI, run npm install -g firebase-tools.
Here are links to both packages:
firebase
firebase-tools
I am trying to install the most recent version of sqlite3 module to make tests of my database models. Note that I am using Ubuntu 21.04. But I am getting this error. Here is the log:
519 info run sqlite3#5.0.2 install node_modules/sqlite3 node-pre-gyp install --fallback-to-build
520 info run sqlite3#5.0.2 install { code: 1, signal: null }
521 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 496ms
522 timing auditReport:getReport Completed in 498ms
523 timing auditReport:init Completed in 0ms
524 timing reify:audit Completed in 499ms
525 timing reify:rollback:createSparse Completed in 86ms
526 timing reify:rollback:retireShallow Completed in 0ms
527 timing command:install Completed in 2791ms
528 verbose stack Error: command failed
528 verbose stack at ChildProcess.(/usr/local/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/index.js:64:27)
528 verbose stack at ChildProcess.emit (events.js:315:20)
528 verbose stack at maybeClose (internal/child_process.js:1048:16)
528 verbose stack at Socket. (internal/child_process.js:439:11)
528 verbose stack at Socket.emit (events.js:315:20)
528 verbose stack at Pipe. (net.js:673:12)
529 verbose pkgid sqlite3#5.0.2
530 verbose cwd /home/diesanromero/Code/platzi/platziverse/platsiverse-db
531 verbose Linux 5.11.0-16-generic
532 verbose argv "/snap/node/4150/bin/node" "/usr/local/bin/npm" "i" "--save-dev" "sqlite3"
533 verbose node v14.16.1
534 verbose npm v7.11.2
535 error code 1
536 error path /home/diesanromero/Code/platzi/platziverse/platsiverse-db/node_modules/sqlite3
537 error command failed
538 error command sh -c node-pre-gyp install --fallback-to-build
539 verbose exit 1
From what I see this is an error generated by node-pre-gyp. I am using the latest version of NPM and NodeJS. I have tried other versions of SQLite3 like 4.1.1 or 5.0.0, but I am getting the same error. I reinstalled node-pre-gyp globally, and nothing happened. I already clean the npm cache, etc.
Anyone has an Idea what is going on?
Npm install on wikimedia packages (parsoid, restbase, plus service-runner and limitation) fails with a git error, despite having copied the source files in advance, and running
npm install <folder>
or
npm install from the actual folder, which has a package.json
or
npm install -g --only=prod --verbose limitation
The dependencies giving errors are sometimes direct dependencies, sometimes dependencies of dependencies.
Setup
- linux / CentrOS 6
git installed by ISP on shared host, git re-install fails
no admin rights since shared hosting
node 11.12.0, npm 6.9.0
only wikimedia packages fail, but not all wikimedia packages
Steps tried
- installing only production dependencies
npm cache verify plus deleting relevant node_module and .npm folders before install
editing package.json to replace git link for dependencies with just the versions, eg for kad 2.5.1
latest version of npm and node
reinstall of node/nvm/npm
also failed with node v11.11.0
using npm list to check any dependency issues and fix in advance
git fix by swapping to http or git protocols failed with same error
Dependencies being looked for include
pegjs
kad
content-type
Example error log: limitation package
(3 dependencies, including bluebird, kad, readable-stream)
135 http fetch GET 200 http://registry.npmjs.org/readable-stream 17ms (from cache)
136 silly pacote range manifest for readable-stream#^2.0.5 fetched in 25ms
137 silly resolveWithNewModule readable-stream#2.3.6 checking installable status
138 silly fetchPackageMetaData error for kad#git+https://github.com/wikimedia/kad.git#master Error while executing:
138 silly fetchPackageMetaData /usr/local/cpanel/3rdparty/lib/path-bin/git ls-remote -h -t https://github.com/wikimedia/kad.git
138 silly fetchPackageMetaData
138 silly fetchPackageMetaData fatal: Unable to find remote helper for 'https'
138 silly fetchPackageMetaData
138 silly fetchPackageMetaData exited with error code: 128
139 timing stage:rollbackFailedOptional Completed in 1ms
140 timing stage:runTopLevelLifecycles Completed in 4749ms
141 verbose stack Error: exited with error code: 128
141 verbose stack at ChildProcess.<anonymous> (/home/mousey/.nvm/.nvm/versions/node/v11.12.0/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js:12:19)
141 verbose stack at ChildProcess.emit (events.js:197:13)
141 verbose stack at maybeClose (internal/child_process.js:988:16)
141 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
142 verbose cwd /home/mousey/.nvm/.nvm/versions/node/v11.12.0/lib/node_modules
143 verbose Linux 2.6.32-896.16.1.lve1.4.54.el6.x86_64
144 verbose argv "/home/mousey/.nvm/.nvm/versions/node/v11.12.0/bin/node" "/home/mousey/.nvm/.nvm/versions/node/v11.12.0/bin/npm" "install" "-g" "--save" "--verbose" "--only=prod" "service-runner"
145 verbose node v11.12.0
146 verbose npm v6.9.0
147 error Error while executing:
147 error /usr/local/cpanel/3rdparty/lib/path-bin/git ls-remote -h -t https://github.com/wikimedia/kad.git
147 error
147 error fatal: Unable to find remote helper for 'https'
147 error
147 error exited with error code: 128
148 verbose exit [ 1, true ]
Git path was set incorrectly, causing the git error:
Unable to find remote helper for 'https'
solution.
git --exec-path revealed the git problem
I still don't understand why git was needed when all files wre local and packages pulled from git were already installed.
Try adding this to your .gitconfig file. There is a known issue in npm with git+http/ssh remotes.
[url "https://github.com/"]
insteadOf = git#github.com:
insteadOf = git://github.com/
insteadOf = git+https://github.com/
insteadOf = git+ssh://git#github.com:
insteadOf = ssh://git#github.com:
insteadOf = ssh+https://git#github.com/
Link for reference
I'm just starting out working with node.js and when I try npm install I get an error stating Failed at the bcrypt#0.8.5 install script 'node-gyp rebuild'. After extensive googling I still have not found the problem.
Here's the error log:
Error Log
313 verbose stack Error: bcrypt#0.8.5 install: `node-gyp rebuild`
313 verbose stack Exit status 1
313 verbose stack at EventEmitter.<anonymous> (C:\Users\Apparaat1\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:239:16)
313 verbose stack at emitTwo (events.js:100:13)
313 verbose stack at EventEmitter.emit (events.js:185:7)
313 verbose stack at ChildProcess.<anonymous> (C:\Users\Apparaat1\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
313 verbose stack at emitTwo (events.js:100:13)
313 verbose stack at ChildProcess.emit (events.js:185:7)
313 verbose stack at maybeClose (internal/child_process.js:827:16)
313 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
314 verbose pkgid bcrypt#0.8.5
315 verbose cwd D:\Werk\W12C\we12c\W12C
316 error Windows_NT 6.1.7601
317 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Apparaat1\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
318 error node v5.7.0
319 error npm v3.7.3
320 error code ELIFECYCLE
321 error bcrypt#0.8.5 install: `node-gyp rebuild`
321 error Exit status 1
322 error Failed at the bcrypt#0.8.5 install script 'node-gyp rebuild'.
322 error Make sure you have the latest version of node.js and npm installed.
322 error If you do, this is most likely a problem with the bcrypt package,
322 error not with npm itself.
322 error Tell the author that this fails on your system:
322 error node-gyp rebuild
322 error You can get information on how to open an issue for this project with:
322 error npm bugs bcrypt
322 error Or if that isn't available, you can get their info via:
322 error npm owner ls bcrypt
322 error There is likely additional logging output above.
323 verbose exit [ 1, true ]
Versions:
node -v
v5.7.0
npm -v
3.7.3
May be it's a little bit late but the solution in node-gyp
https://github.com/nodejs/node-gyp#installation
There are 2
different options.
Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).
Option 2: Install tools and configuration manually:
Visual C++ Build Environment:
Option 1: Install Visual C++ Build Tools using the Default Install option.
Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.
Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 (or see below for further instructions on specifying the proper Python version and path.)
Launch cmd, npm config set msvs_version 2015
If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips.
[Windows Vista / 7 only] requires .NET Framework 4.5.1