I am doing an angular project,but after every changes in java-script file I want to clear the cache.So I want to know is there any angular code for deleting or removing the cache file?
Run: “npm cache clean –force” And if npm cache clean and npm cache verify . are both not working and you still can't clear the cache, you can force clear the cache by running: npm cache clean --force or npm cache clean -f . This will force delete the npm cache on your computer.
A cache object used to store and retrieve data, primarily used by $templateRequest and the script directive to cache templates and other data. angular.
To clear a cache in npm, we need to run the npm cache clean command followed by the --force flag in our terminal. Here is an example: npm cache clean --force. clean: It deletes the all data from your cache folder. You can also verify the cache, by running the following command.
just do this npm cache clear --force
it will work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With