Reputation: 30031
I have a lerna setup with n
packages located under packages/
. Let us take an example where one of the packages uses express where the others do not.
How can I remove express from this package in a lerna-aware manner so the root package.json is updated?
I can add packages with lerna add --scope
but it seems there is no corresponding remove functionality.
Upvotes: 22
Views: 15777
Reputation: 2813
If you want to be sure that lerna bootstrap
only updates the specific package-lock.json
in @org-name/package-name/
and not other package-lock.json
files, do:
@org-name/package-name/package.json
node_modules
directory for this one packagerm -rf packages/package-name/node_modules
lerna bootstrap --scope @org-name/package-name --no-ci --force-local
Upvotes: 1
Reputation: 2185
package.json
rm -rf packages/{package_name}/node_modules
lerna bootstrap
Without step 2 the package still exists in the package-lock.json
NPM lock file.
Upvotes: 18
Reputation: 16158
Just remove the packages from your package.json
then run
$lerna bootstrap
Upvotes: 13