1
votes

My npm installs on windows 10 with the most up to date node.js and npm stable versions always fail when I enter the command npm install while cd'd into my project folder. This specific folder was set up with express as described here. Below is the relevant portion of the verbose failure log. I have no idea what is going wrong, can anyone help?

1315 verbose stack Error: ENOENT: no such file or directory, rename 'C:\Users\carte\Desktop\Queue\Queue\node_modules\amdefine' -> 'C:\Users\carte\Desktop\Queue\Queue\node_modules.amdefine.DELETE' 1316 verbose cwd C:\Users\carte\Desktop\Queue\Queue 1317 verbose Windows_NT 10.0.16299 1318 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\carte\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--verbose" 1319 verbose node v8.11.0 1320 verbose npm v5.8.0 1321 error path C:\Users\carte\Desktop\Queue\Queue\node_modules\amdefine 1322 error code ENOENT 1323 error errno -4058 1324 error syscall rename 1325 error enoent ENOENT: no such file or directory, rename 'C:\Users\carte\Desktop\Queue\Queue\node_modules\amdefine' -> 'C:\Users\carte\Desktop\Queue\Queue\node_modules.amdefine.DELETE' 1326 error enoent This is related to npm not being able to find a file. 1327 verbose exit [ -4058, true ]

3

3 Answers

1
votes

I know this is old, but I had currently this problem and couldn't find answers, so I post my solution, in case it helps someone else.

My problem was that I have npm install on C:\ and my project (or git folder) in G:\.
Moving my folder from G:\ to C:\Desktop and running npm install solved it for me.

I am not sure if it was because of moving it to C:\ or if it was because of moving it outside git-folder.

Edit: before that I actually cleaned npm cached using --force.
I'm using npm v6.7.0 and node v10.15.1

0
votes

which npm version you are using, basically thses errors come with npm version below 5.5. For CLI

supporting information:
npm -v prints: 5.6.0
node -v prints: 8.9.1
npm config get registry prints: https://registry.npmjs.org/
Windows, OS X/macOS, or Linux?: Windows 10
0
votes

In my case, npm install got stuck because I had TypeScript watching file in this directory. So the solution is to stop any tool that might be watching files and try again to install.