Installing Node-RED on a Work (Corporate) Laptop

Hi, the command that is failing is actually a PowerShell command and you are using cmd.exe in that window. That is strange because it works for me.

What version of node.js is installed and have you tried to manually update npm?

I have v12.13.0 of node.js installed. I was able to get the desktop version installed but I get a similar error when I try to install the dashboard node. Something is definitely broken and I'm starting to wonder if this is even enhanced security. I will keep playing around with it and see if I can figure it out.

Thanks

This sounds like the perfect use case for the Dockerised Node-RED :sunglasses:

After installing it on a local directory how will we start node-red from the command line? Calling node-red says it is not recognized as internal or external command. I have installed nodejs and performed a local install to an offline machine. I would like to start node-red in the same now.

node c:\Users\Documents\NodeRed\node_modules\node-red\red.js

this seems to have solved my issue.

So basically what I have done is:

  1. Create a Main folder where I dumped the nodejs msi installer
  2. Create a Node Red folder where I installed node-red locally
  3. used npm to install modules to this node-red local folder
  4. Created a batch script in the main folder which will run the nodejs installation and wait for its completion
  5. If the error code is zero then I will copy the contents of the node-red folder to some directory in the machine where node-red has to be installed
  6. Created a batch script which calls the above command and converted to exe using iexpress.exe
  7. Ran this exe as service

Of course, that won't work because that is most likely not in your PATH variable. So you have to use the absolute path.

Assuming NodeJS is in your PATH, you can start Node-RED manually by running

node [path to node-red]/node_modules/node-red/red.js

If you want to use the command line node-red you should find it in node_modules/.bin

Check out the alternate installer on my GitHub. It contains an npm script in the package.json that contains the command you need.