I've recently started utilizing npm workspaces in my project.
Here is the structure of the app:
.
+-- package.json
-- packages
+-- a
| -- package.json
-- b
-- package.json
The npm install
script should ideally be executed from the root folder.
However, it appears that npm install
can still be run from the a
or b
subfolders, which is not the desired behavior.
Is there a way to prevent users from running npm install
from the subfolders?