Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ENOENT: no such file or directory, rename ansistyles -> .ansistyles.DELETE

I am getting an error when running npm install. It complains about not finding the module /node_modules/ansistyles... that folder does indeed not exist, but there is one with a dash: /node_modules/ansi-styles.

npm install
npm WARN [email protected] No repository field.

npm ERR! path /app/node_modules/npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/app/node_modules/npm/node_modules/ansistyles' -> '/app/node_modules/npm/node_modules/.ansistyles.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:
npm ERR!     /.npm/_logs/2018-02-01T13_20_48_203Z-debug.log

I also ran into the same error when running cordova plugin remove or cordova plugin add.

like image 669
IAmCoder Avatar asked Feb 01 '18 13:02

IAmCoder


1 Answers

Removing package-lock.json did the trick on my Mac!

like image 70
IAmCoder Avatar answered Oct 31 '22 22:10

IAmCoder