Error: EPERM: operation not permitted, unlink 'D:\Sources\**\node_modules\fsevents\node_modules\abbrev\package.json'

前端 未结 30 2290
囚心锁ツ
囚心锁ツ 2020-12-05 04:00

I just updated npm to 5.4.0.
Now, Whenever I want install a npm package I get the following error:

D:\\Sources\\DownloadCms\\Md         


        
相关标签:
30条回答
  • 2020-12-05 04:28

    Deleting package-lock.json fixed it for me.

    0 讨论(0)
  • 2020-12-05 04:29

    For me on Windows the problem was too long path length. I moved the project to a smaller length path and it worked.

    0 讨论(0)
  • 2020-12-05 04:29

    This was the only thing that worked for me:

    npm cache clean --force
    
    npm install -g npm@latest --force
    
    rm package-lock.json
    
    npm i -force
    
    0 讨论(0)
  • 2020-12-05 04:30

    cache clean and npm update to latest with force work for me

    npm cache clean --force
    
    npm install -g npm@latest --force
    
    0 讨论(0)
  • 2020-12-05 04:30

    I simply completely shutdown , NOT hibernated, my machine and restarted it. Ran the CMD as admin and used npm install command. It worked.

    0 讨论(0)
  • 2020-12-05 04:32

    There seems to be many solutions out there that worked with downgrading npm versions. For me, the solution was

    npm install -force
    

    I tried the downgrading of npm versions, modifying my npm prefix config to match the npm directory, and clearing cache. None of these worked, but apparently they worked for others, so it may be worth a shot.

    0 讨论(0)
提交回复
热议问题