Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm (v7.18.+) install, --workspaces flag needed?

If I have a project with workspaces and use npm install on the root folder, do I need the --workspaces flag to install all workspaces, or is it used automatically?

It looks to me like npm install already does this automatically.

like image 977
rhhamburg Avatar asked Oct 25 '25 12:10

rhhamburg


1 Answers

Yes you're right, npm install will install workspaces by default.

More info:

  • https://docs.npmjs.com/cli/v7/using-npm/workspaces#adding-dependencies-to-a-workspace
  • https://ruanmartinelli.com/posts/npm-7-workspaces-1
  • https://dev.to/limal/simplify-your-monorepo-with-npm-7-workspaces-5gmj
like image 79
ruyadorno Avatar answered Oct 28 '25 01:10

ruyadorno