srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
866 stars 211 forks source link

Could not find org.nodejs:node:8.4.0 when GRADLE_METADATA feature is enabled #301

Open warnyul opened 6 years ago

warnyul commented 6 years ago

Problem

I enabled GRADLE_METADATA feature on my kotlin-multiplatform-js project, and I got following error:

Execution failed for task ':prefessor-js:nodeSetup'.
> Could not resolve all files for configuration ':prefessor-js:detachedConfiguration1'.
   > Could not find org.nodejs:node:8.4.0.
     Searched in the following locations:
         https://nodejs.org/dist/v8.4.0/node.module
         https://nodejs.org/dist/v8.4.0/ivy.xml
     Required by:
         project :prefessor-js

Configuration

I use Gradle 4.7 for builds and following gradle-node-js plugin configuration:

node {
    version = 8.4.0
    download = true
}

Workaround

repositories.whenObjectAdded {
    if (it instanceof IvyArtifactRepository) {
        metadataSources {
            artifact()
        }
    }
}
glebiuskv commented 5 years ago

same for other versions of NodeJS (10.10,10.11)

Whathecode commented 5 years ago

Still happens on gradle-node-plugin 1.3.1 and NodeJS 11.12.0.

Whathecode commented 4 years ago

FYI: I have since switched to the com.github.node-gradle.node plugin rather than this one, which no longer seems maintained, which does not have this issue.

simoncarbajal commented 9 months ago

anyway to solve this, like pointing to the already installed node folder? I'm having the error without having GRADLE_METADATA

> Could not find org.nodejs:node:12.22.1.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/nodejs/node/12.22.1/node-12.22.1.pom
       - https://packages.atlassian.com/maven-3rdparty/org/nodejs/node/12.22.1/node-12.22.1.pom
       - https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/org/nodejs/node/12.22.1/node-12.22.1.pom
       - https://nodejs.org/dist/v12.22.1/node-v12.22.1-darwin-arm64.tar.gz