Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
995 views
in Technique[技术] by (71.8m points)

npm install - NPM: ENOENT: no such file or directory, rename

I was using gulp on the project, then i decide to deleted all the dev dependencies to switch to webpack, but every time i try to install using npm is get this error:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modulesfsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'C:UsersMiguelFriasDesktopTherabytes
ode_modules.stagingfsevents-e80c4ef4
ode_modulesare-we-there-yet' -> 'C:UsersMiguelFriasDesktopTherabytes
ode_modules.stagingare-we-there-yet-5db4c798'

npm ERR! path C:UsersMiguelFriasDesktopTherabytes
ode_modulesacorn
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:UsersMiguelFriasDesktopTherabytes
ode_modulesacorn' -> 'C:UsersMiguelFriasDesktopTherabytes
ode_modules.acorn.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!     C:UsersMiguelFriasAppDataRoaming
pm-cache\_logs2018-04-04T11_54_23_587Z-debug.log

any idea what can be happening.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

just delete package-lock.json file and then install packages, that's all you need and should be works

rm package-lock.json && npm i

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...