Can't upgrade npm from 6.9.0 to latest on raspian stretch

My code tells me that the process worked but it hasn't. Also, can't upgrade node-red-contrib-ui-level or node-red-serialport. This all started when my 12c node for bmp085 failed.

bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

npm install node-red-contrib-ui-level

pi@RaspberryPrime:~/.node-red $

npm outdated

Package Current Wanted Latest Location
node-red-contrib-ui-level 0.0.11 0.0.11 0.0.20 node-red-project
node-red-node-serialport 0.6.8 0.6.8 0.8.1 node-red-project
pi@RaspberryPrime:~/.node-red $

sudo npm install -g --unsafe-perm node-red

/usr/bin/node-red -> /usr/lib/node_modules/node-red/red.js
/usr/bin/node-red-pi -> /usr/lib/node_modules/node-red/bin/node-red-pi

  • node-red@0.20.5
    updated 2 packages in 31.588s
    pi@RaspberryPrime:~/.node-red $

npm outdated

Package Current Wanted Latest Location
node-red-contrib-ui-level 0.0.11 0.0.11 0.0.20 node-red-project
node-red-node-serialport 0.6.8 0.6.8 0.8.1 node-red-project
pi@RaspberryPrime:~/.node-red $ npm version
{ 'node-red-project': '0.0.1',
npm: '6.9.0',
ares: '1.15.0',
cldr: '33.1',
http_parser: '2.8.0',
icu: '62.1',
modules: '64',
napi: '3',
nghttp2: '1.34.0',
node: '10.15.1',
openssl: '1.1.0j',
tz: '2018e',
unicode: '11.0',
uv: '1.23.2',
v8: '6.8.275.32-node.12',
zlib: '1.2.11' }

What am I missing here?
Thanks in advance

Given the title of this post, why are you trying to upgrade from npm v6.9?

The bash script will upgrade pre nodejs v8 to v10 but if you have v8 its still supported and will leave it.

So when I ran it on a pi today it came back with
Leave existing Node.js - Node v8.12.0 Npm 6.4.1

Which is fine.

This has nothing to do with the npm install node-red-contrib-ui-level part of your post
When you run npm outdated it looks at the requirements for the node, as in your post the current version matches that wanted then nothing will change.

Thanks for the quick response. This whole thing started when I tried to implement a BMP085 node using

npm install node-red-contrib-bmp085

the install error log only says that it can't install the script with errorcode ELIFECYCLE.
So, I installed another node "node-red-contrib-brads-i2c-nodes" and injected it with 'timestamp' and 'message' but got "undefined unrecognized command."
So, I thought there was a version issue.
I'm at a loss right now.

Its a lot easier to suggest something to do if you focus on one issue and not keep raising others in the same thread.

If you now start node-red it prints some startup information to the window can you copy and paste that information here.

node-red-contrib-bmp085 hasn't been updated in over 4 years. And back in May 0f 2017 someone opened an issue about it not installing. Seeing as the issue has never been assessed, I would assume that the node has been abandoned and you might want to search for another solution to your needs.

Thought that might be the issue. I went to 'node-red-contrib-brads-i2c-nodes' . msg.payload
has "undefined unrecognized command." after injecting either message or timestamp. BMP180 doesn't have a way to set address (I'm using 0x77). BMP280 can be set but gives me the same msg.payload.

What msg.payload?

The msg.payload is: "undefined unrecognized command."
It used to be that bmp085 node responded with a text inject of message but I don't know how to iinject into BMP180 or BMP280. Interesting to note that node BMP180 does not have an I2C selection but BMP280 does.

Ok without your flow or at least a picture of it, the debug message information is now helpful. What node do you have it connected to?

If you are using node-red-contrib-brads-i2c-nodes you might notice from the flows tab that it is an Alpha release


and it hasn't been touched in almost two years....

While I have several bmp180s and bmp280 I connect them to a wemos and use mqtt to send the data to NR on a pi so I haven't tried to read one directly.

You might try looking at the code Adafruit has for the devices. Maybe you could add MQTT code to their examples and in node-red wait for the mqtt messages to arive and process them in NR.

Here's my nodes:

[{"id":"7038f049.497398","type":"tab","label":"BMP180-Test","disabled":false,"info":""},{"id":"4e182bb4.066a24","type":"inject","z":"7038f049.497398","name":"","topic":"","payload":"message","payloadType":"flow","repeat":"","crontab":"","once":true,"onceDelay":"1.0","x":120,"y":100,"wires":[["e471a5f7.7f875","f7655257.9b11e8"]]},{"id":"5ecebc9b.6a9634","type":"debug","z":"7038f049.497398","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":590,"y":100,"wires":[]},{"id":"f29439e9.550a5","type":"debug","z":"7038f049.497398","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","x":580,"y":160,"wires":[],"inputLabels":["msg.payload"]},{"id":"e471a5f7.7f875","type":"bmp180","z":"7038f049.497398","name":"bmp180","topic":"","presolution":244,"debugMode":false,"x":320,"y":100,"wires":[["f29439e9.550a5"],["5ecebc9b.6a9634"]]},{"id":"f7655257.9b11e8","type":"bmp280","z":"7038f049.497398","name":"bmp280","topic":"","address":119,"powermode":1,"tresolution":160,"presolution":20,"x":320,"y":180,"wires":[["5ecebc9b.6a9634"],["f29439e9.550a5"]]}]

oops sorry. Yes, I'm new at this and can barely spell CPU.

@chuckf201- please read this post and then edit your previous post and fix it.