0

I want to run npm install for two different package.json in parallel or one after the other.

I have two package.json in two different folders under the same project. One is for the front end and one is for the back end.

My project structure looks as follows:

package.json
/backend
 -- package.json

I want to hack into the package.json located in my root something like this:

"dep": "npm i \"npm install --prefix backend\"",

So when I run: npm run dep. npm install runs for my package.json in the root and the one in the backend folder.

1 Answer 1

0

The solution is this:

 "deps": "npm i && npm --prefix ./backend install",

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.