can't get over this error for a day, can't find viable solution online, please help me see what I don't see. I have two laptops next to each other, one installed nodejs and cypress flawlessly, one is throwing this kind of error. Tried reinstalling, uninstalling, changing PATH variable, different versions of nodejs, turning off and on, restarting, and looking for solution online for hours. I don't want to download Cypress directly, I want to do it the "correct way". Relevant lines from log:
1116 info run cypress#7.2.0 postinstall node_modules/cypress node index.js --exec install
1117 info run cypress#7.2.0 postinstall { code: 'ENOENT', signal: undefined }
1118 timing reify:rollback:createSparse Completed in 779ms
1119 timing reify:rollback:retireShallow Completed in 0ms
1120 timing command:install Completed in 5328ms
1121 verbose stack Error: spawn C:\Program ENOENT
1121 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
1121 verbose stack at onErrorNT (internal/child_process.js:465:16)
1121 verbose stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
1122 verbose pkgid cypress#7.2.0
1123 verbose cwd C:\Users\sopkop\cypress_project
1124 verbose Windows_NT 10.0.19042
1125 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sopkop\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "cypress"
1126 verbose node v14.16.1
1127 verbose npm v7.11.2
1128 error code ENOENT
1129 error syscall spawn C:\Program
1130 error path C:\Users\sopkop\cypress_project\node_modules\cypress
1131 error errno -4058
1132 error enoent spawn C:\Program ENOENT
1133 error enoent This is related to npm not being able to find a file.
1134 verbose exit -4058
This
spawn C:\Program ENOENT
Looks like you have an unquoted path in the post install. That is probably supposed to "C:\Program Files..." or "C:\Program Files (x86)...". Instead it is trying to execute the C:\Program which fails with ENOENT because it doesn't exist. Check your environment settings and the scripts you are calling.
problem was with user configuration in .npmrc file. contents of the file:
script-shell=C:\Program
Files\git\bin\bash.exe=
registry=http://registry.npmjs.org/
strict-ssl=false
proxy=null
https-proxy=null
not sure where did the "script-shell=C:\Program" come from, but deleting .npmrc file fixed the issue.
Related
I'm trying to build a new NS8 project. I have another NS6.5 project on my computer, but it's in a different folder. When running npm install -g nativescript in a different folder, I get the following error
2323 verbose argv "/Users/.../.nvm/versions/node/v16.4.0/bin/node" "/Users/.../.nvm/versions/node/v16.4.0/bin/npm" "install" "-g" "nativescript"
2324 verbose node v16.4.0
2325 verbose npm v7.18.1
2326 error code ENOENT
2327 error syscall lstat
2328 error path /Users/.../.npm/_cacache/content-v2/sha1/07/e1/3c3118154c53893d3be7a7e08d990e86d859
2329 error errno -2
2330 error enoent ENOENT: no such file or directory, lstat '/Users/.../.npm/_cacache/content-v2/sha1/07/e1/3c3118154c53893d3be7a7e08d990e86d859'
2331 error enoent This is related to npm not being able to find a file.
2332 verbose exit -2
I'm not sure why this is erroring out. Any help would be appreciated. Thanks
I solved this by installing node version 14.17.1 (v6.14.13)
I've been trying to install several node packages that always lead to the npm ERR (images attached below). I was able to install the express package, but not mongoose, mongodb, #angular/cli, during the installation of which I'm facing this error.
The following are my versions of node and npm
Below is the error log that gets saved.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'E:\\Nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Nanda\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli '#angular/cli'
1 verbose cli ]
2 info using npm#6.14.5
3 info using node#v12.16.3
4 verbose npm-session aa9c7864071a84f9
.
.
.
75 verbose stack Error: ENOENT: no such file or directory, rename 'C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\tmp\d74359a7' -> 'C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\1a\94\b0bf25ce70e3a557bd2f6e7ce38f87d6e715bf15d505ea7404b7510dcbb9b86427338b5fbf6ee5543c0aa619fab39ec391345cd432372d4c8a7c6bdb6e09'
76 verbose cwd C:\Users\Nanda
77 verbose Windows_NT 6.1.7601
78 verbose argv "E:\\Nodejs\\node.exe" "C:\\Users\\Nanda\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "#angular/cli"
79 verbose node v12.16.3
80 verbose npm v6.14.5
81 error code ENOENT
82 error syscall rename
83 error path C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\tmp\d74359a7
84 error dest C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\1a\94\b0bf25ce70e3a557bd2f6e7ce38f87d6e715bf15d505ea7404b7510dcbb9b86427338b5fbf6ee5543c0aa619fab39ec391345cd432372d4c8a7c6bdb6e09
85 error errno -4058
86 error enoent ENOENT: no such file or directory, rename 'C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\tmp\d74359a7' -> 'C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\1a\94\b0bf25ce70e3a557bd2f6e7ce38f87d6e715bf15d505ea7404b7510dcbb9b86427338b5fbf6ee5543c0aa619fab39ec391345cd432372d4c8a7c6bdb6e09'
87 error enoent This is related to npm not being able to find a file.
88 verbose exit [ -4058, true ]
Note: I'm on a a windows 7, 32-bit system
I had a similar issue and found the following entry on github:
https://github.com/mapbox/node-sqlite3/issues/900
I just deleted the existing node_modules and installed it again with "npm install"
Ive been looking online for a solution to installing node-sass on my plesk server. I read that this is kind of a no no as this should not be done on a production server(dont care - not a live site).
I have uploaded the documents via bitbucket and click the NPM install button. The result is the failure below:
3822 verbose stack Error: node-sass#4.12.0 install: `node scripts/install.js`
3822 verbose stack spawn ENOENT
3822 verbose stack at ChildProcess.<anonymous> (/opt/plesk/node/9/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
3822 verbose stack at ChildProcess.emit (events.js:180:13)
3822 verbose stack at maybeClose (internal/child_process.js:936:16)
3822 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
3823 verbose pkgid node-sass#4.12.0
3824 verbose cwd /var/www/vhosts/mjmnagy.info/app
3825 verbose Linux 3.10.0-862.9.1.el7.x86_64
3826 verbose argv "/opt/plesk/node/9/bin/node" "/opt/plesk/node/9/bin/npm" "install"
3827 verbose node v9.10.1
3828 verbose npm v5.6.0
3829 error file sh
3830 error code ELIFECYCLE
3831 error errno ENOENT
3832 error syscall spawn
3833 error node-sass#4.12.0 install: `node scripts/install.js`
3833 error spawn ENOENT
3834 error Failed at the node-sass#4.12.0 install script.
3834 error This is probably not a problem with npm. There is likely additional logging output above.
3835 verbose exit [ 1, true ]
I attempted to login to the server using SSH but for the life of me couldn't figure out how to install it.
Using SSH, i navigated to where node is install (/opt/plesk/node/7/bin/) trying 6/7/8 and then running npm. i always got unrecognized command.
I then realized that the version i have of node-sass was higher than the node version install on the server(9.10.1)
What do i need to do to be able to install the module?
ignore plesks NPM install button and create a script in your package.json
"installme": "npm i --unsafe-perms"
Using plesk run the script
installme --scripts-node-prepend-path
I can't install my private module call storage:0.1.1 when I command npm install in the root path.
I write package.json to install this module as:
"dependencies": {
"storage": "file:modules/storage"
}
And I also write package.json in the private module stroage already, it's work on my linux well, on windows well before, but one day I install occur error -4058
And there are error message:
909 verbose stack Error: ENOENT: no such file or directory, scandir 'C:\Users\vincent_lin\AppData\Roaming\npm-cache\storage\0.1.1\package.tgz'
909 verbose stack at Error (native)
910 verbose cwd D:\networkteam\meta\git_meta_static_develop
911 error Windows_NT 6.1.7601
912 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
913 error node v4.4.2
914 error npm v2.15.0
915 error path C:\Users\vincent_lin\AppData\Roaming\npm-cache\storage\0.1.1\package.tgz
916 error code ENOENT
917 error errno -4058
918 error syscall scandir
919 error enoent ENOENT: no such file or directory, scandir 'C:\Users\vincent_lin\AppData\Roaming\npm-cache\storage\0.1.1\package.tgz'
919 error enoent This is most likely not a problem with npm itself 919 error enoent and is related to npm not being able to find a file.
920 verbose exit [ -4058, true ]
PS: I have tried to use powershell with administration and I checked the path
C:\Users\vincent_lin\AppData\Roaming\npm-cache\storage\0.1.1\package.tgz
is correct.
And I ever update npm to latest version, it still exist error.
Thanks for any response.
In Windows you must use \ slash and not / slash.
Please provide relative path starting with a .\
Eg: "dependencies": { "storage": "file:.\modules\storage" }
Or provide the full path starting with the drive letter.
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