hounan
hounan

Reputation: 19

npm link not work as I expect but can see node module updated

Hi I plan to test my node module from local; I navigate to the folder I need to link and did

npm link

This created a symlink locally. Then I navigate my project and did

npm link @account/api

Then I see the node module @accout/api under my project has been updated, I checked the /src, and it had my updates.

But after I run "npm run dev", I didn't see my update, it still used previous code. Any ideas about this issue? Thanks!

Upvotes: 0

Views: 2695

Answers (1)

Ramz
Ramz

Reputation: 43

After updating node modules sometimes the changes are not implemented. You can try some of below process-

  1. Check for the changes after restarting your PC.

  2. If after restarting it doesn't work, try to clear npm cache using command below

npm cache clean --force

Or you can manually delete npm cache from your PC.

Upvotes: 2

Related Questions