npm error on every command: EEXIST: file already exists, mkdir 'c:\users\user\appdata\Roaming\npm'

后端 未结 8 1733
孤街浪徒
孤街浪徒 2021-01-02 13:10

I\'m just new to node and npm and this is frustrating.

Well it\'s almost all said in the title. On a Windows 10 x64 using a NON elevated prompt, all npm commands sho

相关标签:
8条回答
  • 2021-01-02 13:18

    For me, cd ios && pod install && cd .. fixed it.

    0 讨论(0)
  • 2021-01-02 13:20

    I had the same issue and was able to resolve it on Windows by running the cmd prompt as Admin.

    0 讨论(0)
  • 2021-01-02 13:30

    Try reinstalling node and npm for the non-admin account. If that's not an option, you can use the portable version:

    Download from http://nodejs.org/dist/
    Extract the archive.
    Open cmd and cd to the extracted folder.
    Run nodevars.bat.

    It will set PATH and other things so you can now use node from this folder.

    0 讨论(0)
  • 2021-01-02 13:34

    In my case remove white space from folder name.

    0 讨论(0)
  • 2021-01-02 13:39

    I also had this problem. Just delete npm folder, it will be created again. This problem is due to user privileges.

    0 讨论(0)
  • 2021-01-02 13:41

    I had similar issue, solved it by removing .npmrc file, located at c:\Users\<USER>\ location.

    I believe it was caused by running earlier npm config set in wrong location.

    Kudos to this comments thread.

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