[BUG FIX] Fix path resolution for executables
There’s an issue with mac silicion+intellij, whereby gradle process executor is not respecting path environment variables.
This gets around that by using a fix for the plugin whereby we attempt to resolve the path manually.
https://github.com/node-gradle/gradle-node-plugin/issues/152
https://youtrack.jetbrains.com/issue/IDEA-334183
We hit this constantly with our development team and this fix resolved it for us.
I've got a hunch of what you're trying to solve, but if you can describe the problem I can give better pointers
Updated comments. I prematurely submitted this pr, apologies.
Is this published yet? I have a similar issue when running under WSL2: I have nodejs installed both on windows and on WSL (Ubuntu). Despite having my PATH set to pick the WSL version, when I run gradle commands, it picks up the windows version of npm instead. The only thing that works is activating the npm install task, which I don't want since I already have a system-level nodejs installed. I'm using v7.1.0.
I have this issue too. I'm using 7.1.0 and have Node.JS on my Mac (arm64), I'm sure that npm is usable, but the task always logs Cause: error=2, No such file or directory.
I hope this can be merged and published, or at least provide a snapshot publication.
I built it on jitpack.io
Now we can use this in build.gradle.kts:
buildscript {
repositories {
maven(url = "https://jitpack.io")
}
dependencies {
classpath("com.github.NextChapterSoftware.gradle-node-plugin:com.github.node-gradle.node.gradle.plugin:FixGradleNode-SNAPSHOT")
}
}
apply(plugin = "com.github.node-gradle.node")
It actually works to me.