npm install Error: rollbackFailedOptional

前端 未结 26 1085
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-28 04:26

When I try npm install new packages it shows me this error:

rollbackFailedOptional: verb npm-session 585aaecfe5f9a82

<
26条回答
  •  天命终不由人
    2020-11-28 05:07

    The cause for this might be your current NPM registry. Try to check for a .npmrc file. These can be at various locations:

    • per-project config file (/path/to/my/project/.npmrc)
    • per-user config file (~/.npmrc)
    • global config file ($PREFIX/etc/npmrc)
    • npm builtin config file (/path/to/npm/npmrc)

    Within these there can be something like

    registry=https://mycustomregistry.example.org
    

    which will take priority over the default one (http://registry.npmjs.org/). You can delete this line in the file or use the default registry like that:

    npm  --registry http://registry.npmjs.org/
    

提交回复
热议问题