The official installation script installed npm 6.14.6, but I noticed 6.14.8 is available? If update npm, am I going to break anything with NR standard installation?
No, its only a minor update, feel free to upgrade it.
Which version of nodejs are you running?
node -v
One on test system so far, 6.14.8, the script installs 6.14.6 of course.
I was asking for the nodejs version. The recommended install on Debian/Ubuntu/Pi installs nodejs from the nodesource repository (when it can) and the nodejs package there includes npm. I am using nodejs 14.x and I see that already comes with npm 6.14.8 so I was interested in which nodejs you are using. Also if you are on a Linux system what do you see if you run sudo apt update
and then apt policy nodejs
?
Oh... my bad... was thinking npm, since my question was about npm. The node.js is the latest the offical NR script installed, so v12.18.3. I have not installed node.js other than using the script. But for the sake of discussion apt shows:
# apt install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (12.18.3-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~# apt policy nodejs
nodejs:
Installed: 12.18.3-1nodesource1
Candidate: 12.18.3-1nodesource1
Version table:
*** 12.18.3-1nodesource1 500
500 https://deb.nodesource.com/node_12.x stretch/main armhf Packages
100 /var/lib/dpkg/status
8.11.1~dfsg-2~bpo9+1 500
500 http://archive.raspberrypi.org/debian stretch/main armhf Packages
4.8.2~dfsg-1 500
500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages
Yes, you are right, nodejs 12.x does come with npm 6.14.6. I assume v12 is only getting bug fixes now so it may not get updated for a while, so if you need to upgrade npm urgently then you will probably have to upgrade npm manually as you suggest.
I don't know whether the install script installs nodejs 14 yet, though it wouldn't upgrade from 12 anyway as that is ok for node red. One would have to uninstall nodejs then run the script to find out.
no - not yet.
I was only looking at updating npm.... given I have tripped over some odd behavior with my script that mass loads, batches, node modules. I still see once in a while where npm just does not do what we know it should do. If I slowly load/install things with npm, the issues to not result, but if I push npm via multiple command line calls, or a many modules per single npm call, randomly, I get weird results. All of which of course you have seen documented here. So been keeping an eye on the npm release schedule.
Are you making sure that if you do sequential calls that each one finishes before the next starts?
Yeah, I have 3 different methods I tested via explicit scripting.
- single line
- loop with 1 npm install per named package, this script did not do anything in parallel
- script with each install explicitly called (just like human would with cli), this also did nothing in parallel
Each mode, if you will did something odd in different ways, at times. None of the methods was 100% consistent, 100% if of the time. I did 60 odd tests across all methods above. Entire modules failed to show in a npm list grep test for example. Or looking at the manage palette installed list, things were missing, showed as not installed, even after NR restart. But no errors were reported by npm at the time.
I finally decided to just make sure all the packages were installed in the image file correctly via visual validation, and replicate the image file as needed.
The 4th method, just letting npm install a canned package.json, from a different device, this worked better than any of the other methods, except that once in a while the dashboard module would install, no errors, but crash on load as NR started, and tried to load it. I also posted a forum query about this odd behavior as well. This has happened 3 times now, over about 40 odd tests. Interesting thing is 2 of the 3 times, it has been on PiZero devices.
I also have a new order of SSD micro cards pending, I want to repeat everything above, with new media, just to make sure that is not a factor. I believe 1 of the 2 package.json tests on PiZero, failed due to a bad SSD media. The card did not generate any errors or issues, when the package json npm load executed, npm reported no errors. But the SSD card did fail on a reboot less than 24 hours later.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.