Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k 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: fsevents@1.1.3 (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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...