Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/lib/content/using-npm/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ the npm installer that package should be added as a dependency of the provided
workspace:

```
npm install abbrev -w a
npm install abbrev -w packages/a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually correct, and included to show that the -w flag accepts the name of the workspace, not just the path.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not working here (Windows 10, Node 18.15.0)

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the name attribute of the package.json in packages/app?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I get it. The argument to -w is not the directory name but the package name defined in package.json. Sorry for the misunderstanding, but it's not precisely stated in the documentation. The example used in documentation is directory structure oriented, hence my confusion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Perhaps the examples could be updated so the directory and package names differ, to make this more clear?

```

Note: other installing commands such as `uninstall`, `ci`, etc will also
Expand Down