Raspberry pi 3 Model B node-red error


Hi Today, I want to use node-red and dashboard for Raspberry pi 3 Model B.
I was only download node-js.
And I am started node-red but I'm not saw palette menu.
And I tried 'npm install node-red dashboard' but I saw error message.

'/opt/nodejs/lib/node_modules/npm/bin/npm-cli.js:85
let notifier = require('update-notifier')({pkg})
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3'
Help me, please.

It's always useful to show the log if you have an issue.
But that is a very old version of Node-RED.

Have you tried upgrading using the script on the Raspberry Pi page in the documentation on the website? This will download and install the correct version of nodejs and the latest version of Node-RED.

So, can I use this command? 'npm install -g node-red '

Look at the Install/Upgrade section of the page I suggested you read. https://nodered.org/docs/hardware/raspberrypi

  1. is that the exact command you issued? because there is a dash - missing between red and dashboard
  2. did you do a cd .node-red before issuing the command?

When installing nodes using the CLI you always want to be in the .node-red directory before using the npm command.

Yes, but I saw this error too:cry::cry:

root@raspberrypi:~/.node-red# npm install node-red-dashboard
/opt/nodejs/lib/node_modules/npm/bin/npm-cli.js:85
let notifier = require('update-notifier')({pkg})
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3

I solved this problem! Thank you~:blush:

I solved this problem! :blush: