Message Boards

nodejs download fails due to invalid link (Protocol switch unsafe)

thumbnail
tamallah seifedine, modified 3 Years ago.

nodejs download fails due to invalid link (Protocol switch unsafe)

New Member Posts: 13 Join Date: 6/15/14 Recent Posts

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 ..?

thumbnail
Christoph Rabel, modified 3 Years ago.

RE: nodejs download fails due to invalid link (Protocol switch unsafe)

Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts
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)
    }
}
thumbnail
tamallah seifedine, modified 3 Years ago.

RE: nodejs download fails due to invalid link (Protocol switch unsafe)

New Member Posts: 13 Join Date: 6/15/14 Recent Posts

thanks Christoph , that solved the problem .