Nx cache can be cleared by removing files in the directory node_modules/.cache/nx
.
Sometimes, you have to clear cache. For example, if you moved a component to another library, the component was still kept in the cache of the old library. This may break builds.
Top comments (3)
We have implemented this solution in our project:
package.json
checkAndClearCache.js
You can also use the
--skip-nx-cache
flag :)This was top result on google for me, so wanted to add this here, that nx now has a way of clearing the various caches etc: nx.dev/reference/core-api/nx/docum...