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

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

    If you downgrade to 5.3 and still get the same error in Windows like me.
    After hours working with npm versions I found the following solution:

    1. Download latest recommended version of nodejs, these days is node-v6.11.3-x64
    2. Uninstall nodejs with it.
    3. Go to C:\Users\{YourUsername}\AppData\Roaming folder and delete npm and npm-cache folders
    4. Run installer of nodejs again and install it
    5 Update npm to 5.3 with npm i -g npm@5.3 command line

    Now you should use npm without any issues.

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

    For me it worked in bash from git package try:

    C:\Program Files\Git\bin\bash.exe
    

    then:

    npm install mds.angular.datetimepicker@latest
    
    0 讨论(0)
  • 2020-12-05 04:38

    npm cache verify solved my issue. I was doing: ng new my-app and I faced similar error

    I have node version: 10.16.0
    npm v 6.9.0

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

    It is an npm 5.4.0 issue https://github.com/npm/npm/issues/18287

    Workarounds are

    • downgrade to 5.3
    • try running with --no-optional, i.e. npm install --no-optional
    0 讨论(0)
  • 2020-12-05 04:39

    I fixed by downgrading npm from 5.4.0 to version 5.3

    npm i -g npm@5.3
    

    I Hope this helps for you

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

    For windows,

    1. Download latest recommended version of nodejs, these days is node-v6.11.3-x64
    2. Uninstall nodejs with it.
    3. Go to C:\Users\{YourUsername}\AppData\Roaming folder and delete npm and npm-cache folders
    4. Run installer of nodejs again and install it
    5. By default npm 3.10.10 should be installed along with node-v6.11.3-x64.
    6. It worked for me with npm 3.10.10 but did not work with 5.3.X. Also it did not worked with higher versions of node (above node-v6.11.3-x64)
    0 讨论(0)
提交回复
热议问题