-
Notifications
You must be signed in to change notification settings - Fork 25
Updating or adding Packages
veeramarni edited this page Apr 10, 2020
·
10 revisions
- First, you need to delete root's
package-lock.json - Search for the package and add to the search box with replace value so the package is get updated in all the packages.json files if it used
- Run
npm install -ffrom the root. - Make sure none of the node_modules are installed under subdirectories of
packagesorservers. Look fornpm_modulesunder theservers\frontend-serveretc... to make sure no localnode_modulesare created.
If the package is not generic for the whole project then add it to the package.json of the package folder where it will be used.
You can use the following command.
$ lerna add --scope=<module> <package>[@version] [--dev] [--exact] [--peer]
Example
$ lerna add --scope=sample-stack-frontend-server apollo-link@^1.2.13
-- you can do with regex --
$ lerna add --scope=*frontend-server apollo-link@^1.2.13
You will see the package added to that module by checking its package.json