Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/375.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Heroku构建在gradle任务';节点设置';有错误';不能';t遵循符号链接';_Java_Node.js_Gradle_Heroku - Fatal编程技术网

Java Heroku构建在gradle任务';节点设置';有错误';不能';t遵循符号链接';

Java Heroku构建在gradle任务';节点设置';有错误';不能';t遵循符号链接';,java,node.js,gradle,heroku,Java,Node.js,Gradle,Heroku,我第一次在heroku上创建应用程序时,一切正常,但在nodeSetupgradle任务的构建过程中,所有后续部署都会失败,并出现此错误 Failed to capture fingerprint of output files for task ':nodeSetup' property 'nodeDir' during up-to-date check. > Could not list contents of '/tmp/build_f8eae163382a61b289

我第一次在heroku上创建应用程序时,一切正常,但在
nodeSetup
gradle任务的构建过程中,所有后续部署都会失败,并出现此错误

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.

每次我想部署它时,我都必须创建一个新的heroku项目。所以,这只是第一次起作用。即使我使用
/gradlew clean
清除缓存,它也会在生成过程中失败,因为它没有清除
.gradle
文件夹

如果我使用SSH连接到项目中并手动运行
/gradlew build
,它就可以正常工作。该错误仅在heroku构建过程(构建包)中发生

我使用的目的是在项目中使用前端的网页包

我想很多人也遇到过类似的问题。这可能是因为缓存目录并试图在第二次部署时访问不存在的目录

这是完整的构建日志

-----> Gradle app detected
-----> Spring Boot detected
-----> Installing JDK 1.8... done
-----> Building Gradle app...
-----> executing ./gradlew build -x test
       > Task :bootBuildInfo
       > Task :compileKotlin
       > Task :nodeSetup FAILED

       FAILURE: Build failed with an exception.

       * What went wrong:
       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.

       * Try:
       Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

       * Get more help at https://help.gradle.org

       BUILD FAILED in 27s
       3 actionable tasks: 3 executed
 !     ERROR: Failed to run Gradle!
       We're sorry this build is failing. If you can't find the issue in application
       code, please submit a ticket so we can help: https://help.heroku.com
       You can also try reverting to the previous version of the buildpack by running:
       $ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-gradle#previous-version

       Thanks,
       Heroku
 !     Push rejected, failed to compile Gradle app.
 !     Push failed
就我个人而言,我不在乎是否缓存了任何东西,重建需要更长的时间,因为目前,部署甚至不起作用。我很想发送一个公关,如果在这里需要做什么方向的指导,但现在,有什么工作我可以做


我正在寻找任何可以让我在构建开始之前清除缓存,或者将构建命令自定义为不同的gradle任务,或者任何可能有帮助的东西。

问题的一部分是,
gradle节点插件
正在创建具有绝对路径的符号链接。它可能应该创建相对路径


不管怎么说,我已经开了一家银行。一旦发布,这个问题应该会消失。

我通过将节点和纱线目录更改为相对于项目的方式解决了这个问题-in.gradle/这解决了问题,还缓存了安装