Always starts from changing node_modules/
directly, for more complex use cases
🔰🔰🔰
/path/to/lib $ npm link
/path/to/app $ npm link lib
- creates global symlink
/path/to/app $ npm install /path/to/lib
- "@node-config": "2.0.22",
+ "@node-config": "file:../node-config",
- modifies
package.json
asfile:/path/to/lib
- creates local symlink
- runs preinstall/postinstall
Do
/path/to/lib $ npm pack | tail -n 1
before npm i <pkg>
and replace pkg
with the generated tarball(pkg-[version].tgz
) instead.
npm pack
solution ⇢ https://github.com/mweststrate/relative-deps