# Installation of nodes in offline mode is sometimes taking longer time and sometimes it is installing quickly

**URL:** https://discourse.nodered.org/t/installation-of-nodes-in-offline-mode-is-sometimes-taking-longer-time-and-sometimes-it-is-installing-quickly/78840
**Category:** General
**Created:** [31 May 2023 11:02 UTC](https://discourse.nodered.org/t/installation-of-nodes-in-offline-mode-is-sometimes-taking-longer-time-and-sometimes-it-is-installing-quickly/78840 "2023-05-31T11:02:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jayashree](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jayashree](https://discourse.nodered.org/u/jayashree)
#### Post date: [31 May 2023 11:02 UTC](https://discourse.nodered.org/t/installation-of-nodes-in-offline-mode-is-sometimes-taking-longer-time-and-sometimes-it-is-installing-quickly/78840/1 "2023-05-31T11:02:29Z")

</div>

i tried to install nodes without internet but installation of nodes taking longer time(more that 20 min), some time nodes are not installing. what may be the issue and how we can fix this issue. (how we can install nodes within 2 or 3 min) using node red API

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [31 May 2023 11:53 UTC](https://discourse.nodered.org/t/installation-of-nodes-in-offline-mode-is-sometimes-taking-longer-time-and-sometimes-it-is-installing-quickly/78840/2 "2023-05-31T11:53:05Z")

</div>

We had a very similar question asked on the Node-RED issue tracker last week - [NODE install through API taking too long for some nodes in offline environment · Issue #4188 · node-red/node-red · GitHub](https://github.com/node-red/node-red/issues/4188) - is this related?

As I commented on that issue, It would be helpful to know what your experience is running the npm command directly on the offline device to install your tgz. I suspect there's something in npm that is trying to access the network and it is having to time out.

---

<div class="post-metadata">

### Author: ![jayashree](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jayashree](https://discourse.nodered.org/u/jayashree)
#### Post date: [31 May 2023 12:26 UTC](https://discourse.nodered.org/t/installation-of-nodes-in-offline-mode-is-sometimes-taking-longer-time-and-sometimes-it-is-installing-quickly/78840/3 "2023-05-31T12:26:27Z")

</div>

we are using -\> **npm pack node\_name** command to install TGZ file, but we tried this command in online mode not offline.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [31 May 2023 12:28 UTC](https://discourse.nodered.org/t/installation-of-nodes-in-offline-mode-is-sometimes-taking-longer-time-and-sometimes-it-is-installing-quickly/78840/4 "2023-05-31T12:28:22Z")

</div>

`npm pack` creates the tgz file.

When you pass it to node-red using the admin api, node-red then calls:

```auto
npm install <path-to-the-tgz-file>

```

Any delays in installing will be coming from `npm`.

I'm suggesting you try running the `npm install` command with your tgz manually and see if that has the same delays as when doing it through Node-RED's admin api.

---

<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: [31 May 2023 14:04 UTC](https://discourse.nodered.org/t/installation-of-nodes-in-offline-mode-is-sometimes-taking-longer-time-and-sometimes-it-is-installing-quickly/78840/5 "2023-05-31T14:04:30Z")

</div>

And as also noted in that issue there are flags for the command that stop it checking for updates, audit checks etc which are also worth setting

---

<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: [30 July 2023 14:04 UTC](https://discourse.nodered.org/t/installation-of-nodes-in-offline-mode-is-sometimes-taking-longer-time-and-sometimes-it-is-installing-quickly/78840/6 "2023-07-30T14:04:31Z")

</div>

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