What I Wanted to Do
I would like to install/update dependencies in my local dependency and not worry that I have to update package-lock.json in all my projects in monorepo that use this local dependency.
What Happened Instead
New or updated dependencies in local dependency are not installed if these changes are not present in the package-lock.json in project that uses local dependency. Even updated package-lock.json in local dependency doesn’t help, it is ignored.
git clone https://github.com/fresk-nc/npm-local-demo.git cd npm-local-demo/core npm i --save commander cd .. git clean -fdx cd www npm i
There is no problem if there are node_modules in the project, new/updated dependencies will be installed and package-lock.json will be updated.
$ npm --versions 6.9.0 $ node -p process.platform darwin