Closed sergeykad closed 1 year ago
I'm unable to reproduce this, which Gradle version are you using and how are you applying the plugin? The closest I can get is by incorrectly applying it as a settings plugin, but that gives me:
* Where:
Settings file '/Users/deepy/projects/test/settings.gradle.kts' line: 10
* What went wrong:
An exception occurred applying plugin request [id: 'com.github.node-gradle.node', version: '5.0.0']
> Failed to apply plugin 'com.github.node-gradle.node'.
> class org.gradle.initialization.DefaultSettings_Decorated cannot be cast to class org.gradle.api.Project (org.gradle.initialization.DefaultSettings_Decorated and org.gradle.api.Project are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @5649fd9b)
I use Gradle 8.1.1
plugins {
id 'com.github.node-gradle.node' version '5.0.0'
}
Hmm, same version I tried with, I wonder if this is the case of a corrupted download?
Could you try with --refresh-dependencies
or by clearing out the jar from ~/.gradle/caches/modules
Out of curiosity you could also check the sha1sum of the 5.0.0 jar and see if it matches 32619fc6128b09ceaf9554453066fc3b97b89f0d
(and see if there's any files in it)
Thanks!. That indeed was the issue. Our Nexus server had a corrupted version, so it started failing for everyone.
This is exactly the same case for us! Strange part is; when I delete the cached version from Nexus it starts working for a short while but then again it gets corrupted for some reason. And this is the only dependency getting broken. 🤷♂️
Could not apply requested plugin [id: 'com.github.node-gradle.node', version: '7.0.1'] as it does not provide a plugin with id 'com.github.node-gradle.node'. This is caused by an incorrect plugin implementation. Please contact the plugin author(s).
The reason was actually quite simple; we are using Maven2 group for plugins and jitpack.io
was appearing before Gradle plugins repository and jitpack.io
was somehow returning a broken version of gradle-node-plugin.
The plugin suddenly stopped working. Reverting to v4 solved the issue