srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
866 stars 211 forks source link

npm_cache_clean does not work anymore since npm5 #304

Open damnms opened 6 years ago

damnms commented 6 years ago

Task :my-project-webclient:npm_cache_clean FAILED npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. npm ERR! npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.

npm ERR! A complete log of this run can be found in: npm ERR! /home/xxx/.npm/_logs/2018-08-02T08_08_25_296Z-debug.log

Is there any way to configure that task to add the "--force" option? Unfortunately i must provide backward compatibility, so i can not simply skip that delete cache task.