The first time I create an application, everything works fine, but all subsequent deploys fail during the nodeSetup
task with this error
Failed to capture fingerprint of output files for task ':nodeSetup' property 'nodeDir' during up-to-date check.
> Could not list contents of '/tmp/build_f8eae163382a61b2896d7be434b4dc58/.gradle/nodejs/node-v8.12.0-linux-x64/bin/npm'. Couldn't follow symbolic link.
I have to create a new heroku project every time I want to deploy this. So, it only works for the first time. Even if I clear the cache using ./gradlew clean
, it fails during the build because it does not clear the .gradle
folder
If I SSH into the project and manually run ./gradlew build
, it works without a problem. The error only happens during the heroku build process (of the buildpack)
I am using https://github.com/srs/gradle-node-plugin in order to use webpack for the frontend in the project https://github.com/zhcet-amu/zhcet-web.
I guess similar issues have been encountered by many people. This may be due to caching the directory and trying to access non-existent one on second deploy?
Personally, I don't care if anything is cached or not and rebuilding takes longer as currently, deployments don't even work. I'd love to send a PR if guided in the direction of what needs to be done here, but for now, is there any workaround I can do?
I am looking for anything that can either let me clear the cache before building starts, or customize the build command to a different gradle task, or anything else that may help
Thanks