Install all project dependencies from command line

Hi all, if I have a local project, and move it to other installations, it there a way to install the project dependencies listed in the project package.json from the command line?

you should be able to just run npm install in that directory.

1 Like

But that installs the packages in projects/foo/node_modules. Dont they need to be in the main ~/.node-red/node_modules?

Hi! I tried to run npm install on the project folder (/data/projects/project-name/ for the docker images), but it doesn't add the required modules to the project, it generates a node_modules folder with the dependencies inside it, but it doesn't show as installed on the dashboard, and the custom nodes are still shown as "unknown".

Am I missing something? Is the procedure different on the Docker images?

1 Like

Can we have someone come back to this! This solution does not add the nodes from your project dependencies and freezes up your editor by re-adding all of your node-modules in your projects folder and overloads the git integration. Please help me to figure out how to get the npm install working for a git projects folder.

You should run the command in your .node-red folder, not the project folder.

I see that you have asked this question in a new thread. I am closing this one as it is a year old.