I've used node-red on an RPi for several years. I'm doing a presentation on node-red next week so I installed a local copy on my laptop (Windows 10 x64, MS surface) using the instructions at Running on Windows : Node-RED.
I had an old version of nodejs on my system so I upgraded to the latest LTS. I had it install all the build tools as well. I had no errors installing node.
node --version
v18.13.0
npm --version
9.4.0
I then installed node-red via the NPM package manger without any errors.
npm install -g --unsafe-perm node-red
node-red runs just fine. However, I can't install from the palette. When I attempt to do so, it seems NPM is trying to create the directory C:\
29 Jan 20:39:29 - [info] Server now running at http://127.0.0.1:1880/
29 Jan 20:39:29 - [info] Starting flows
29 Jan 20:39:29 - [info] Started flows
29 Jan 20:40:05 - [info] Installing module: node-red-dashboard, version: 3.3.1
29 Jan 20:40:07 - [warn] Installation of module node-red-dashboard failed:
29 Jan 20:40:07 - [warn] ------------------------------------------
29 Jan 20:40:07 - [warn] npm WARN config production Use `--omit=dev` instead.
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path c:\
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'c:\'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'c:\'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'c:\\'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\James\AppData\Local\npm-cache\_logs\2023-01-30T03_40_07_182Z-debug-0.log
29 Jan 20:40:07 - [warn] ------------------------------------------
Error: Install failed
at C:\Users\James\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\installer.js:285:25
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
29 Jan 20:40:07 - [error] Error: Install failed
29 Jan 20:41:11 - [info] Stopping flows
29 Jan 20:41:11 - [info] Stopped flows
If I use the manual install process via NPM it works just fine.
c:\Users\James\.node-red% npm install node-red-dashboard
added 54 packages, and audited 55 packages in 2s
found 0 vulnerabilities
And restarting, node-red shows that dashboard is now installed as expected.
I have this same issue regardless of which module I attempt to install.
I figured maybe something odd was going on with the install so I uninstalled node, killed the .node-red folder under my user account, reinstalled node & node-red. But, sadly, same results.
Anyone have any ideas why node-red on windows isn't able to do an npm install node-red-dashboard
correctly? Seems like it's some node-red config issue since I can do a straight npm install without a problem.
Any thoughts / help would be appreciated.