Node-RED install on Raspbian Buster Lite

I just burned a Raspbian Buster Lite image and want to install Node-RED. The new Node-RED documentation suggests running this command:

$ bash <(curl -sL

It fails however. The last line of /var/log/nodered-install.log reports:
sudo: npm: command not found

Higher up in the log, during the fresh install of Node LTS, it says

The following additional packages will be installed:
  libc-ares2 libnode64 libuv1 nodejs-doc
Suggested packages:

I fixed the error by downloading the script and explicitly installing npm when installing Node LTS

What exactly did you add to the script?

Npm is included in the node package from nodesource. You should not have needed to do anything.

Ah actually the error is just before that - caused by debian moving from testing to stable - and then not being happy to just upgrade things... fix pushed to script - should be ok to re-run.

1 Like

Once I additionally installed the npm package via apt-get, the script ran to completion.
$ node -v

yes - running it a second time would have the effect of then doing the update and upgrade over the top... but shouldn't have been necessary.

Dave - The fixed script ran successfully. Thanks.
Nick - I just added npm to the appropriate install step (I know it should not have been necessary, but it was)
if sudo apt-get install -y nodejs npm curl
Dave's fix was a better approach on Raspbian Buster as it moved from testing to stable.
-- John

I had similar errors: sudo: npm: command not found
and got hung up on the step where the script tries to install nodejs and finally I saw on the Raspberry forum to run: sudo apt update --allow-releaseinfo-change
This fixed the problem and the installation ran OK after that.

Yup - The --allow-releaseinfo-change flag was the fix that Dave implemented in the install script. Works for me now.
-- John