node-gradle / node-gradle/gradle-node-plugin
Add option download auto
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 677
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
We can have option auto here:
https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/usage.md#configuring-the-plugin
look at the comments
node {
// options: yes | no | auto
// Whether to download and install a specific Node.js version or not
// If "no", it will use the globally installed Node.js
// If "yes", it will download node using above parameters
// Note that npm is bundled with Node.js
// If "auto", it will check and download node only if its mising (auto will check if node is installed and switch between yes and no modes)
download = 'auto'
}
In CI environment there is no sense to download node if its already exist. If node exist and its downloaded another version of node from this plugin its have versions conflicts in alpine:
https://github.com/node-gradle/gradle-node-plugin/issues/51
for this issue with download = true :
#8 141.5 FAILURE: Build failed with an exception.
#8 141.5
#8 141.5 > Task :webpack FAILED
#8 141.5 * What went wrong:
#8 141.5 Execution failed for task ':webpack'.
#8 141.5 > A problem occurred starting process 'command '/.gradle/nodejs/node-v16.14.0-linux-x64/bin/node''
my temp fix is to set download = false and install node manually apk add --update nodejs npm
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configuring-the-plugin section in docs/usage.md and review the linked issue #51 for the existing version-conflict context. Trace the current download option behavior from that configuration, then confirm that an auto option can use an installed Node.js when present and download the configured version when it is missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, nodejs
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100