npm install Error: rollbackFailedOptional

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

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

rollbackFailedOptional: verb npm-session 585aaecfe5f9a82

<
相关标签:
26条回答
  • Seem this bug is not fixed yet [1]. Some people get worked, some people not. I also get not worked.

    I tried clear cache with command: npm cache verify then run install command again. I got worked.

    [1]. https://github.com/npm/npm/issues/17246

    0 讨论(0)
  • 2020-11-28 04:52

    I set two system environment variables -

    1. HTTP_PROXY = <_proxy_url_>
    2. HTTPS_PROXY = <_proxy_url_>

    This actually worked for me.

    0 讨论(0)
  • 2020-11-28 04:52

    While installing the Angular Command line tool (CLI), If you are getting Rollback Error then it may be occurring due to your network is connected with your Client Network or your Company Network where you are working on.

    So Please try to install CLI in your public network (or Your Mobile's hotspot Network) then you would definitely get CLI installed.

    0 讨论(0)
  • 2020-11-28 04:52

    Try this. It worked fine for me

    npm install /your_floder_location package_name --registry http://registry.npmjs.org/

    Below is the exact command for me for installing vue-router package in my laravel project (my project name vue_laravel)

    aslam004:vue_laravel $ npm install /var/www/html/projects/vue_laravel vue-router --registry http://registry.npmjs.org/

    Good luck

    0 讨论(0)
  • 2020-11-28 04:54

    If you have access to the registry but the error is still occurred nothing mentioned above wouldn't work. I noted that this problem is only applicable for local project's installation (i.e. if you use -g to global install everything is working fine).

    What's resolved the problem for me: just remove an entry regarding a package you're going to install from a project's package.json file. After that next call to npm will work and install the package successfully.

    0 讨论(0)
  • 2020-11-28 04:55

    I've already had the proxies set as described above and it was working until today. Then it turned out that now I need "http://" in front of my proxy address: "http://{proxyURL}:{proxyPort}". Then it finally worked.

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