Reputation: 33
So in my recent project I tried to install some node modules, in this case, express and MySQL, which both return the same error:
npm WARN [email protected] No repository field.
npm ERR! path C:\Users\user\projectroot\node_modules\on-finished npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\user\projectroot\node_modules\on- finished' -> 'C:\Users\user\projectroot\node_modules.on-finished.DELETE' 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:
I tried to delete all the related files, then reinstalling it, however that did not change anything. I have run npm init
before the install even attempted to fill in the dependency manually, to then run npm install
. It happens with every node module in any node project I have.
Upvotes: 0
Views: 1307
Reputation: 33
Turns out the issue was because the dropbox tried to synchronize the files as i was installing the package. Pausing or disabling this fixes the issue...
Upvotes: 1
Reputation: 845
Could you try this please:
1 - Ensure no NPM scripts are running.
2 - Navigate to your project route
3 - Run this command:
rm package-lock.json && npm i
Note - it may also be worth trying to delete your 'node_modules' folder in your project directory and running the above command.
Upvotes: 0