Open ptrtht opened 4 years ago
@qty0 I have similar issue for any node version with this plugin now. I see that this plugin no supported now, but many documents has link to this plugin. As workaround you can use new version https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/node.md
I'm having lots of similar issues for days now. it has something to do with mooworks conflicts I think., or kotlinNodeJsSetup or resources folders. No matter what I do I can't get jsBrowserTests to run with my stuff. But everything else runs fine. Days wasted on this, discussion link in slack might work for details of troubleshooting:
https://kotlinlang.slack.com/archives/C3PQML5NU/p1585030653200800
I'm having lots of similar issues for days now. it has something to do with mooworks conflicts I think., or kotlinNodeJsSetup or resources folders. No matter what I do I can't get jsBrowserTests to run with my stuff. But everything else runs fine. Days wasted on this, discussion link in slack might work for details of troubleshooting:
Either you'll have to downgrade Gradle far back or switch to a fork.
For me, problem was solved in the slack thread I posted above. How or why this solved it I do not know exactly, but it feels like its directly injecting my js dependancy into karma thru webpack.config external file or something like that.
The solution was to create a folder and file on the root directory called karma.config.d/config.js with the following in it: config.files.unshift(require('path').resolve(__dirname, "../../../processedResources/frontend/main/libs/js/[YOUR JS FILE NAME].min.js"));
Not a fan of having this extra config on the root level and personally I don't understand what this TRUELY is or why I can't configure it from gradle multiplatform... I mean a goal of gradle is to be able to configure everything with it right?
I think this is related to changes in Gradle 6: https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:supported_metadata_sources
It is looking for an ivy.xml file that is not published / available.
This would probably need to change here: https://github.com/srs/gradle-node-plugin/blob/a987e56f105c7cf706361c6c70c517af17ff459c/src/main/groovy/com/moowork/gradle/node/task/SetupTask.groovy#L180
metadataSources { ivyDesriptor() artifact() }
Actually this seems already to be know: https://github.com/srs/gradle-node-plugin/pull/349#issuecomment-540650222
There's an actively maintained fork at https://github.com/node-gradle/gradle-node-plugin But we've dropped the grunt/gulp support in favor of npx
Thanks I already switched to that fork. I wasn't aware this not longer being maintained. Your fork works good with Gradle 6 so thanks a lot.
Added a fork with the fix for those using earlier gradle versions (Tested with gradle 2.11).
If you're still on gradle 2 you have great incentives to upgrade, it's a pretty painless process and gradle gets much faster
@deepy I would love to upgrade but for some reasons the monolith of a framework we are using supports only gradle 2.11. Sadly not everyone gets to use the new and shiny version of a program :(
That kinda makes me curious about your fork as this issue comes with gradle 4 or 3
I bypassed the way node js was meant to be downloaded using gradle here:
this.repo = this.project.repositories.ivy {
url distUrl
layout 'pattern', {
artifact 'v[revision]/[artifact](-v[revision]-[classifier]).[ext]'
ivy 'v[revision]/ivy.xml'
}
}
and simply wrote some download logic which gets the correct node version respective of the os and arc
I started a new gradle app, in which I want to do reactjs FE. I am unable to run my build due to the following error:
My build.gradle looks like this:
I only have nodejs
v10.15.3
installed. What can be the problem in my case?