Sako
Sako

Reputation: 97

How can I have my react app notice updates in a npm module?

I'm making some tweaks to an npm package for my app and for some reason it's not being recognized when I start my dev server. I was able to get it recognized by deleting the library and then reinstalling + replacing the files with the ones I had saved locally, but even that doesn't work anymore. I tried deleting the browser's cache, but that didn't work either.

I'm using Nextjs with Typescript and using console logs to see when the file change is recognized by react.

Thanks for any help.

Upvotes: 0

Views: 28

Answers (1)

Sako
Sako

Reputation: 97

It looks like I had to delete the cache folder that is generated in the .next directory. So if I want to make changes and see them reflected right away I need to stop the server, delete the cache folder, then start the server again. In case others had this issue, that's the solution.

Upvotes: 1

Related Questions