Comments (9)
How did the build fail?
I can't think of anything that should break
from gradle-node-plugin.
it fails with latest Gradle 6.x release for every node.js version since 12.x
* What went wrong:
Execution failed for task ':nodeSetup'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
> Could not find org.nodejs:node:12.15.0.
Searched in the following locations:
- https://nodejs.org/dist/v12.15.0/ivy.xml
Required by:
project :
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
but it works with latest 5.x release
from gradle-node-plugin.
Same problem here
from gradle-node-plugin.
I found a solution / workaround last night. It's using node-gradle plugin to download node/yarn/npm but on top of that gradle-node-plugin tasks.
import com.moowork.gradle.node.yarn.YarnTask
plugins {
id("com.github.node-gradle.node") version "2.2.1"
}
repositories {
jcenter()
}
node {
// PLEASE use node LTS version or version with even major number
version = "12.15.0"
yarnVersion = "1.22.0"
download = true
}
tasks {
val build by registering(YarnTask::class) {
dependsOn("yarn_install")
args = listOf("build")
}
}
from gradle-node-plugin.
The problem is (or at least should be) Gradle 6.x, not the node version, you can see #315 for more information about the issue.
There's multiple issues/PRs about the lack of Gradle 6 support.
The plugin you're using in the solution is the fork available at https://github.com/node-gradle/gradle-node-plugin which should work fine with all available Gradle versions ;-)
from gradle-node-plugin.
@deepy I didn't find any fork hints or something like that so I assumed it's a different plugin.
Do I need import com.moowork.gradle.node.yarn.YarnTask
or is there another solution?
from gradle-node-plugin.
The fork should work fine without any workarounds, I don't think you need to import YarnTask
to get this to work, simply changing to id("com.github.node-gradle.node") version "2.2.1"
should be fine
from gradle-node-plugin.
I don‘t think so due to you need to import YarnTasks.
from gradle-node-plugin.
Added a fork with the fix for those using earlier gradle versions (Tested with gradle 2.11).
https://github.com/Jensen-Mourat/gradle-node-plugin
from gradle-node-plugin.
Related Issues (20)
- Version issue during build HOT 1
- How to pass command line argument to npm task in node application HOT 2
- Cannot download node version HOT 2
- How to use npm ci instead of npm install? HOT 3
- No value has been specified for property 'packageJsonFile'. HOT 2
- Error messages that someone can actually do something about. HOT 2
- npm WARN deprecated request HOT 2
- can't find nodeJS 10.15.3 ? HOT 14
- Set tag when publishing HOT 1
- Plugin with id 'com.moowork.node' not found. HOT 3
- Could not get unknown property 'npm_run_build' for project HOT 1
- How to install and build additional dependency? HOT 1
- download = false HOT 2
- com.moowork.node plugin throwing error when i try ./gradlew build HOT 3
- Build fails with Gradle 7 HOT 5
- Cannot use the newest version with SonarQube Plugin HOT 3
- Node download on s390x Linux on Z platform is not supported HOT 2
- Compatible with gradle 7.1 not working HOT 2
- Support for limit on parallel task runs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-node-plugin.