Package linked to npm link is not updating
I have two modules - my main project and a component library where I want to link the lib to the main project. Both work with webpack and are responsive. So I did:
In comp-lib dir:
npm link
In the dir project:
npm link comp-lib
The package shows up in the node_modules folder, but when I work on the component library, the changes are not reflected in the main project. What am I missing?
I couldn't find anything about this issue on Google, and the dpm link n only says the following example: "Now any changes to ~ / projects / node-redis will be reflected in ~ / projects / node-bloggy / node_modules / node -redis / ".
source to share
Had a similar issue with a bundled package - npm link dep
building an old version of "dep".
Running npm link
(again) in the "dep" folder solved the problem. In theory it should only be called once, but for some reason it sometimes doesn't sync.
Thus, to reliably update the linked project, follow these steps after each change:
- Rebuild the linked project
- run
npm link
- In the host project
npm link dep
source to share