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

前端 未结 30 2286
囚心锁ツ
囚心锁ツ 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:14

    I had the same issue and all I needed to do was login to npm

    npm login

    or alternatively

    npm add user // consult the documentation for the params  

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

    After trying everything, including node/npm upgrade, cache cleaning and reverting code, nothing helped besides one simple thing: Turning OFF Windows 10's Real-time protection during the dev/build. Looks like latest updates made it super aggressive.

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

    In my case, the problem was that, I did not install typescript. Although I did install Node and Angular. To check if you have installed typescript or not

    Run this command: tsc -v
    

    If not, then to install typescript

    Run this command: npm install -g typescript
    

    And, finally to install required dependencies

    Run this command: npm install
    

    in the root folder of the project.

    ---- Hope this helps someone ----

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

    If all of the above failed to work for you, you might want to

    • restart your system
    • run command prompt as admin
    • run the npm command
    0 讨论(0)
  • 2020-12-05 04:16

    Fixed in NPM 5.6.0

    Upgrade to NPM 5.6.0 solved problem for me.

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

    I tried this solution found at a How to fix Node.js blog

    just use

    npm cache clean
    

    in windows if it refuses use

    npm cache clean --force
    
    0 讨论(0)
提交回复
热议问题