# Error / rollbackFailedOptional: verb npm-session

**URL:** <https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484>\
**Category:** General\
**Created:** [21 January 2021 10:34 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484 "2021-01-21T10:34:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![iotred3307](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotred3307/32/35716_2.png) [@iotred3307](https://discourse.nodered.org/u/iotred3307)\
**Post date:** [21 January 2021 10:34 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484/1 "2021-01-21T10:34:49Z")

</div>

Trying to install Nodered using the command ```  
npm install -g --unsafe-perm node-red

```auto

Error is rollbackFailedOptional: verb npm session

ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npmjs.org/node-red failed, reason: connect ECONNREFUSED 10.4.231.104:8080
npm ERR! at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR! at ClientRequest.emit (events.js:315:20)
npm ERR! at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:101:9)
npm ERR! at callbackError (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:123:5)
npm ERR! at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! FetchError: request to https://registry.npmjs.org/node-red failed, reason: connect ECONNREFUSED 10.4.231.104:8080
npm ERR! at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR! at ClientRequest.emit (events.js:315:20)
npm ERR! at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:101:9)
npm ERR! at callbackError (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:123:5)
npm ERR! at processTicksAndRejections (internal/process/task_queues.js:93:5) {
npm ERR! type: 'system',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! code: 'ECONNREFUSED'
npm ERR! }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:

I checked the proxy settings and they are correct. Can anyone help me please?
```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 January 2021 11:20 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484/2 "2021-01-21T11:20:15Z")

</div>

Welcome to the forum.

Can you ping the URL from that machine?

---

<div class="post-metadata">

**Author:** ![iotred3307](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotred3307/32/35716_2.png) [@iotred3307](https://discourse.nodered.org/u/iotred3307)\
**Post date:** [21 January 2021 12:23 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484/3 "2021-01-21T12:23:16Z")

</div>

Thank you.

Yes, _ping [registry.npmjs.org](http://registry.npmjs.org)_ works from that PC.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [21 January 2021 13:19 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484/4 "2021-01-21T13:19:51Z")

</div>

`10.4.231.104` is a non routable address so must be inside your private / work network - so indeed as it says npm cannot reach the registry using http - so something is not correct or your proxy is set to block you or needs more configuration. That will be down to you and your IT department to figure out.

---

<div class="post-metadata">

**Author:** ![iotred3307](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotred3307/32/35716_2.png) [@iotred3307](https://discourse.nodered.org/u/iotred3307)\
**Post date:** [28 January 2021 11:38 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484/5 "2021-01-28T11:38:22Z")

</div>

Thank you for your input. Our IT team resolved the proxy problems. I have an additiona Q here.

Which command should I run on CentOs so that the Nodered starts automatically after boot and stay active forever?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 January 2021 12:29 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484/6 "2021-01-28T12:29:13Z")

</div>

depends how you installed it. If you used our script then it installs a nodered.service file and you can use `sudo systemctl enable nodered.service` to enable it. See [Starting Node-RED on boot : Node-RED](https://nodered.org/docs/faq/starting-node-red-on-boot)

If not then you can manually install it and setup the systemd file as you wish.

---

<div class="post-metadata">

**Author:** ![iotred3307](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotred3307/32/35716_2.png) [@iotred3307](https://discourse.nodered.org/u/iotred3307)\
**Post date:** [28 January 2021 13:22 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484/7 "2021-01-28T13:22:42Z")

</div>

Thank you very much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 February 2021 13:23 UTC](https://discourse.nodered.org/t/error-rollbackfailedoptional-verb-npm-session/39484/8 "2021-02-11T13:23:19Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
