Skip to content

Updating or adding Packages

veeramarni edited this page Apr 10, 2020 · 10 revisions

Updating Packages

  1. First, you need to delete root's package-lock.json
  2. 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
  3. Run npm install -f from the root.
  4. Make sure none of the node_modules are installed under subdirectories of packages or servers. Look for npm_modules under the servers\frontend-server etc... to make sure no local node_modules are created.

Adding packages

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

Contributing

Clone this wiki locally