# Unable to install/update nodes

**URL:** <https://discourse.nodered.org/t/unable-to-install-update-nodes/44555>\
**Category:** General\
**Created:** [22 April 2021 15:27 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555 "2021-04-22T15:27:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)\
**Post date:** [22 April 2021 15:27 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/1 "2021-04-22T15:27:32Z")

</div>

Hi, I'm not able to install/update any node any more!! I even copied back the original settings.js in order to avoid any modification I was trying on it. From manage palette as well as from command line, I always get this error:  
Raspberry pi3+ with debian buster  
Node-RED version: v1.2.9  
Node.js version: v12.21.0  
Linux 5.10.17-v7+ arm LE

I have tryed with several nodes but it's always the same ☹ (updating the existing nodes as well as installing new ones)

> Failed to update node-red-contrib-cron-plus  
> Install failed  
> Check the log for more information

And this is the log.

> 2021-04-22T15:16:28.487Z Install : node-red-contrib-cron-plus 1.4.3  
> 2021-04-22T15:16:28.756Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-cron-plus@1.4.3  
> 2021-04-22T15:16:54.544Z [err] npm  
> 2021-04-22T15:16:54.547Z [err]  
> 2021-04-22T15:16:54.549Z [err] ERR!  
> 2021-04-22T15:16:54.550Z [err] Maximum call stack size exceeded  
> 2021-04-22T15:16:54.605Z [err]  
> 2021-04-22T15:16:54.606Z [err] npm ERR! A complete log of this run can be found in:  
> 2021-04-22T15:16:54.606Z [err] npm ERR! /home/pi/.npm/\_logs/2021-04-22T15\_16\_54\_554Z-debug.log  
> 2021-04-22T15:16:54.653Z rc=1

And this is /home/pi/.npm/\_logs/2021-04-22T15\_16\_54\_554Z-debug.log

> 0 info it worked if it ends with ok  
> 1 verbose cli [  
> 1 verbose cli '/usr/bin/node',  
> 1 verbose cli '/usr/bin/npm',  
> 1 verbose cli 'install',  
> 1 verbose cli '--no-audit',  
> 1 verbose cli '--no-update-notifier',  
> 1 verbose cli '--no-fund',  
> 1 verbose cli '--save',  
> 1 verbose cli '--save-prefix=~',  
> 1 verbose cli '--production',  
> 1 verbose cli 'node-red-contrib-cron-plus@1.4.3'  
> 1 verbose cli ]  
> 2 info using npm@6.14.11  
> 3 info using node@v12.21.0  
> 4 verbose npm-session 83b3762bc883aae8  
> 5 silly install loadCurrentTree  
> 6 silly install readLocalPackageData  
> 7 http fetch GET 304 [https://registry.npmjs.org/node-red-contrib-cron-plus](https://registry.npmjs.org/node-red-contrib-cron-plus) 4689ms (from cache)  
> 8 silly pacote version manifest for node-red-contrib-cron-plus@1.4.3 fetched in 4855ms  
> 9 verbose stack RangeError: Maximum call stack size exceeded  
> 9 verbose stack at /usr/lib/node\_modules/npm/node\_modules/aproba/index.js:39:16  
> 9 verbose stack at Array.forEach ()  
> 9 verbose stack at validate (/usr/lib/node\_modules/npm/node\_modules/aproba/index.js:34:11)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:37:3)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 9 verbose stack at flatNameFromTree (/usr/lib/node\_modules/npm/lib/install/flatten-tree.js:39:14)  
> 10 verbose cwd /home/pi/.node-red  
> 11 verbose Linux 5.10.17-v7+  
> 12 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "--no-audit" "--no-update-notifier" "--no-fund" "--save" "--save-prefix=~" "--production" "node-red-co$  
> 13 verbose node v12.21.0  
> 14 verbose npm v6.14.11  
> 15 error Maximum call stack size exceeded  
> 16 verbose exit [1, true]

---

<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:** [22 April 2021 15:44 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/2 "2021-04-22T15:44:18Z")

</div>

It appears that npm is crashing for some reason. Either something has messed up npm itself, or your node\_modules folder or package.json or package-lock.json are causing the problem.  
What happened prior to the problem appearing? Knowing that may help to work out what to do about it.

---

<div class="post-metadata">

**Author:** ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)\
**Post date:** [22 April 2021 16:12 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/3 "2021-04-22T16:12:04Z")

</div>

I have two folders under .node-red (test\_1 and test\_2) that I run with separate node-red instances:  
node-red -u /home/pi/.node-red/test\_1 -s /home/pi/.node-red/settings.js -p 1881  
node-red -u /home/pi/.node-red/test\_2 -s /home/pi/.node-red/settings.js -p 1882  
In each of these folders I made a simlink to .node-red/node\_modules  
Now, in order to simplify my backup process I wanted to move these 2 folder in another directory, so I copy-paste them recreating the simlink to .node-red/node\_modules, leaving the original folders as they were,  
Now I'm encountering this problem of installing/updating nodes from wherever, even running the simple node-red command

I even tryed with  
bash \<(curl -sL [https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered))  
but it exits without showing anything, as it hasn't been executed at all

---

<div class="post-metadata">

**Author:** ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)\
**Post date:** [22 April 2021 16:16 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/4 "2021-04-22T16:16:16Z")

</div>

I even tried to delete all the files in .node/red (including settings.js) so that running node-red it would recreate them all. But nothing, the problem still remains

---

<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:** [22 April 2021 16:30 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/5 "2021-04-22T16:30:52Z")

</div>

Rename the .npm folder in your home directory, rename the .node-red folder and start node red in a terminal. If it won't go then post the log here.

---

<div class="post-metadata">

**Author:** ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)\
**Post date:** [22 April 2021 18:43 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/6 "2021-04-22T18:43:46Z")

</div>

In this way it works again, but I have to reinstall all the nodes ☹

---

<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:** [22 April 2021 19:43 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/7 "2021-04-22T19:43:26Z")

</div>

Put package.json back and run  
`npm install`

---

<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:** [23 April 2021 08:31 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/8 "2021-04-23T08:31:49Z")

</div>

I suspect that it was getting rid of ~/.npm that fixed it, something in there may have been messed up by the experiments you were performing.

---

<div class="post-metadata">

**Author:** ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)\
**Post date:** [25 April 2021 15:33 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/9 "2021-04-25T15:33:11Z")

</div>

Yes, probably something messed up by my experiments

---

<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:** [9 May 2021 15:33 UTC](https://discourse.nodered.org/t/unable-to-install-update-nodes/44555/10 "2021-05-09T15:33:52Z")

</div>

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