Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: nodejs download fails due to invalid link (Protocol switch unsafe)
failures using Gradle v.6 + Workspace / liferay 7.2 , Here is the stacktrace exception of the first build command :
> Task :downloadNode FAILED Trying to download http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz to /home/jenkins/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp Trying to download http://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz to /home/jenkins/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':downloadNode'. > Redirection detected from http to https. Protocol switch unsafe, not allowed.
For the moment I get to pass by this by downloading node manually into the build/node folder after the 2nd build command , waiting for official FIX ..?
Try to add this to the build.gradle:
allprojects {
plugins.withId("com.liferay.node") {
node.global = true
node.nodeUrl = node.nodeUrl.replace("http:", "https:")
System.out.println(node.nodeUrl)
}
}
thanks Christoph , that solved the problem .