Immigrant to beautiful Canada 🇨🇦 working on Node.js things @Google, previously npm cli team @GitHub • Node.js core collaborator • JavaScript • CLI • Open Source • DX [he/him]
It seems to me you were hitting one of the biggest DX hiccups (IMO) we're still yet to solve, which is the fact that in order to work with workspaces you can NOT cd into that folder (e.g: cd apps/web) - instead what you want to do is to run the command from the project root level and set a workspace config value, like: npm start -w ./apps/web
It's the same for adding new dependencies to a workspace, let's say you want to add a new dependency named path-complete-extname to a child workspace at ./apps/web, then the syntax to do so is to run from the root: npm install path-complete-extname -w ./apps/web (notice you can also just use the "name" value of a child workspace, so if the name property of ./apps/web/package.json is web then you can simply run: npm install path-complete-extname -w web
Again, thanks for the feedback! This type of real life UX report helps us a lot!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I see! thanks a lot for the feedback! 😄
It seems to me you were hitting one of the biggest DX hiccups (IMO) we're still yet to solve, which is the fact that in order to work with workspaces you can NOT cd into that folder (e.g:
cd apps/web
) - instead what you want to do is to run the command from the project root level and set a workspace config value, like:npm start -w ./apps/web
It's the same for adding new dependencies to a workspace, let's say you want to add a new dependency named
path-complete-extname
to a child workspace at./apps/web
, then the syntax to do so is to run from the root:npm install path-complete-extname -w ./apps/web
(notice you can also just use the "name" value of a child workspace, so if thename
property of./apps/web/package.json
isweb
then you can simply run:npm install path-complete-extname -w web
Again, thanks for the feedback! This type of real life UX report helps us a lot!