Remove dependency from nested Lerna Package
- Remove package from
package.json
- Remove node_modules folder:
rm -rf packages/{package_name}/node_modules
- Run
lerna bootstrap
Without step 2 the package still exists in the package-lock.json
NPM lock file.
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:
Manually remove dependencies from
@org-name/package-name/package.json
Run:
lerna bootstrap --scope @org-name/package-name --no-ci --force-local
Just remove the packages from your package.json
then run
$lerna bootstrap