New installation - full raspbian - today

Just installed latest node red onfully up to date new raspbian on pi2. SQLITE and other nodes no problem (sqlite takes ages to install) - but no serial;port - so in NR I went to pallette manager - install node-red-node-serialport - why even now is this standard part if a pi a problem? Before any of this, In the raspbian setup I made sure serial was enabled and debug console disabled.

Pete

Did you use the install script provided or your own script?

Which version of nodejs have you got installed ?

The NodeJS is the current version 8.11 – all of this was installed today. 

I used my own script, used hundreds of times to install node node red nodes, phs and much more. This is the first time I’ve hit a brick wall with serial… 

The upgrade script on the node red site – I assume you mean this one 
```- ash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)```

Could you format your post please Pete :open_mouth:

1 Like

I tried the RPI script mentioned above. It used to work, now it simply screrwed up settings.js and removed some nodes - there was notying new sinceearly this afternoon anyway.

Thankfully I'd backed everything up with the wonderful rpi-clone so I'm back to square one - all working but no serial port.

Can anyone advise?

What npm version are you using.
npm -v

Paul

Can you explain what you mean by that? I don't believe the script touches the settings file... so what happened to it?

Were the nodes it removed ones that were missing from package.json?

Sorry Nick - I went to my backup beafore I got to see what happened. Paul, - Npm 8.x

None of which is helping with my originasl issue - what happened with the serialport node. It simply refuses to install. Any ideas?

Have you posted the error you get? I don't see it.

Since there is a script provided that does install the node then presumably there is a difference between the environment provided by the script and that provided by your script. Either that or the method of installation is different. You need to find what that difference is.

What happens if you install it manually. Can you post the error log ?

cd ~/.node-red && npm i node-red-node-serialport

hi, i've issues too, today... tried on both ubuntu 16.04 and 18.04... here are the logs: https://pastebin.com/uvMWD1Tw
as you can see, errors at the end about bcrypt...
i even installed some other nodes BEFORE (line 67 in previous link), trying to prevent those node-pre-gyp errors...

nodejs v8.11.4 node-red v0.19.1 npm v6.4.0

this is what i did:
curl -sL https://deb.nodesource.com/setup_8.x > nodesetup.sh
sudo bash nodesetup.sh
sudo apt-get install -y nodejs
sudo npm install -g npm node-gyp node-pre-gyp
sudo npm install -g --unsafe-perm node-red

I am getting (npn install serialport - with or without sudo - and with or without the node-red-node prefix) "error - method not allowed"

Pete - which version of npm is in use ?
Are you trying to install a) globally ? b) using sudo ?
You shouldn't need to install serialport on it's own as well will require it in

Hi Dave

I was installing in the home/pi/.node-red directory as the node did not appear in Node-Red despite enabling serial on the pi settings as usual and disabling serial debugging. NPM 8 – and I tried both sudo and without as user pi…. Both said error – method not allowed. I’ve never had that error before.. and I’m not new to sorting i2c and PI serialport issues.

Anyway I’m doing another install from scratch with node 6 – again on a PI2… – will report back and I’ll be a little more precise this time.

Pete

ok, - new install from scratch....using npm 6. Node-Red is working fine but node-red-node/arduino is complaining "error - cannot find module "serialport" and there is no serial in the inputs and outputs in NR.

For the next step I stopped node-red and in the home/pi/.node-red directory ran npm i node-red-node-serialport as instructed here: https://www.npmjs.com/package/node-red-node-serialport?activeTab=readme

NPM came back with the same problem - "Error - method not allowed".

Pete
what I just did is start with clean Raspbian Stretch install (I used minimal to test)

  • set up ssh, change hostname, password, set overclock as required.
  • run sudo apt-get update && sudo apt-get -y dist-upgrade
  • reboot
  • run our bash install/upgrade script from the docs

That gets me node 8.11.4 and npm 5.6.0 and Node-RED with serialport.
Then

  • cd ~/.node-red && npm i node-red-node-arduino
  • node-red-stop && node-red-start

And then I have both serial and arduino nodes.

Careful with that version of npm, I had problems with it only a few days ago which is caused by this npm issue.
sudo npm install -g npm@5 gets you npm version 5.10.0 which resolves the issue.

Paul

1 Like

Something sadly wrong at my end then. Node 8.11.4 samer as Dave but npm –v returns 1.4.21

Any ideas anyone?