npm ERR! Refusing to delete / code EEXIST

前端 未结 12 994
暖寄归人
暖寄归人 2020-12-24 11:17

I\'m just running a simple npm install and i get this error.

npm ERR! path /Users/jasonazoulay/Desktop/fabrick.io/delegation/node_modules/@angul         


        
相关标签:
12条回答
  • 2020-12-24 12:00

    I had a similar problem and what seems to have worked is to uninstall npm and reinstall it, making sure to be logged in as the correct user for the reinstall. I think I previously installed npm as root, but was updating a package as a regular (sudo) user.

    0 讨论(0)
  • 2020-12-24 12:01
    1. Uninstall node.js from control panel
    2. Delete below folders
    C:\Program Files (x86)\Nodejs
    C:\Program Files\Nodejs
    C:\Users\{User}\AppData\Roaming\npm (or %appdata%\npm)
    C:\Users\{User}\AppData\Roaming\npm-cache (or %appdata%\npm-cache)
    C:\Users\{User}\.npmrc (and possibly check for that without the . prefix too)
    C:\Users\{User}\AppData\Local\Temp\npm-*
    
    1. Install node.js again
    0 讨论(0)
  • 2020-12-24 12:05

    Try running npm update -g npm then run npm i again.
    If that doesn't work maybe npm cache clean helps.

    If that doesn't work either you should consider removing the node_modules folder in your application and running npm i again.
    If you still have no luck, I suggest removing the package-lock.json and the node_modules folder before running npm i.

    0 讨论(0)
  • 2020-12-24 12:07

    I the same error but when I was trying to update module "cordova" to version 9. I fixed it by forcing the install with --force. The npm command I used:

    npm i -g --force cordova@9 
    
    0 讨论(0)
  • 2020-12-24 12:09

    Steps

    1. Delete the node_modules directory completely.
    2. Run npm install again.

    This should help.

    0 讨论(0)
  • 2020-12-24 12:11

    I had this problem when working on a virtual, encrypted disk. Moving the project to a regular disk solved the problem.

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