![](/img/trans.png)
[英]Gradle Build - Execution failed for task ':sonarqube' can't be indexed twice
[英]Heroku build failed during gradle task 'nodeSetup' with error 'Couldn't follow symbolic link'
第一次在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
清除了緩存,在構建過程中./gradlew clean
失敗,因為它不會清除.gradle
文件夾
如果我通過SSH進入項目並手動運行./gradlew build
,那么它將正常工作。 該錯誤僅在(構建包的)heroku構建過程中發生
我正在使用https://github.com/srs/gradle-node-plugin以便將webpack用於項目https://github.com/zhcet-amu/zhcet-web中的前端。
我猜很多人都遇到過類似的問題。 這可能是由於緩存目錄並嘗試在第二次部署中訪問不存在的目錄嗎?
這是完整的構建日志
-----> 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
就我個人而言,我不在乎是否緩存了任何內容,並且重建所需的時間比目前要長,部署甚至無法工作。 如果希望按照此處需要完成的工作方向進行指導,我希望發送PR,但是目前,我可以采取任何解決方法嗎?
我正在尋找可以使我在構建開始之前清除緩存,或將build命令自定義為其他gradle任務的東西,或其他可能有幫助的東西
問題的一部分是gradle-node-plugin
創建帶有絕對路徑的符號鏈接。 它可能應該在創建相對路徑。
無論如何,我已經在Gradle buildpack上打開了PR,以將該目錄從緩存中排除 。 一旦發布,這個問題就應該解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.