Questions tagged [gradle-node-plugin]

Gradle plugin that allows you to use node and npm in your gradle builds.

https://github.com/node-gradle/gradle-node-plugin

14 questions
9
votes
1 answer

How can I set "--max-old-space-size" when using gradle-node-plugin or force in in node config?

I am using https://github.com/srs/gradle-node-plugin to launch NPM tasks as part of my build. But, webpack is now running out of heap space, reporting FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory I can't figure…
Shorn
  • 19,077
  • 15
  • 90
  • 168
3
votes
1 answer

Could not resolve all files for configuration ':_:detachedConfiguration1' when using node plugin on gradle kotlin dsl

I'm trying to integrate Java and npm Builds Using Gradle Kotlin DSL. I was going through the example dzone article and github example code. I'm in npm-app project folder and running the command gradle npm_run_build. $ gradle npm_run_build Task…
user51
  • 8,843
  • 21
  • 79
  • 158
3
votes
2 answers

Change registry url in gradle node plugin

I am using gradle with gradle-node-plugin. The problem is that I don't have access to public registers so node cannot download anything from https://registry.npmjs.org/. I need to use nexus as proxy butt don't know how to change url to which npm is…
user3450486
  • 215
  • 4
  • 16
2
votes
0 answers

How can I compile a TypeScript file using a Gradle task?

I have an OpenAPI schema, and I want to make sure that it produces valid TypeScript code. Using the Gradle Node Plugin I can generate TypeScript code from the openapi.yml file by calling openapi-typescript in an npx task. import…
aSemy
  • 5,485
  • 2
  • 25
  • 51
2
votes
0 answers

Could not find org.nodejs:x64

When I try to build my Frontend app I get Could not resolve all dependencies for configuration ':frontend:nodeDist'. > Could not find org.nodejs:x64/node:6.17.1. Searched in the following locations: http://nodejs.org/dist/v6.17.1/ivy.xml …
1
vote
1 answer

How to configure all subprojects that are using NodePlugin in Gradle

I have a multi-project, and a few of its subprojects use the Gradle Plugin for Node. ./subproject/build.gradle: // GitHub: https://github.com/node-gradle/gradle-node-plugin plugins { id "com.github.node-gradle.node" version "3.4.0" } // ... I…
Markus Weninger
  • 11,931
  • 7
  • 64
  • 137
1
vote
2 answers

Pass command line option to npm install in gradle node plugin

Using the gradle node plugin com.github.node-gradle.node, how do I pass a command line option to the NpmInstallTask? Background: For security reasons, I want to pass "--ignore-scripts".
Matthias Simon
  • 388
  • 5
  • 13
1
vote
1 answer

No value has been specified for property 'command', gradle node plugin

task npmInstallPkg(type: NpxTask){ doLast{ //install node packages from package.json dependsOn npmInstall //install pkg globally command = 'npm' args = ['install', '-g', 'pkg'] } } Whenever I try to…
1
vote
1 answer

Process started with java's Process.exec always returns exit code 0

I start shell scripts with java Process.exec (for reasons), and they always return 0 exit value, regardless of exit value of script itself (which I can check by running said script in OS shell. For additional info, those scripts run gradle tasks…
m.ostroverkhov
  • 1,910
  • 1
  • 15
  • 17
0
votes
1 answer

Static worker unexpectedly exited with code: null and signal: SIGTERM when using node-gradle plugin

I want to use Gradle Plugin for Node to package my Spring Boot REST api and yarn based Next.js frontend project. I have read a lot on the Net and found: build.gradle plugins { id 'java' id 'org.springframework.boot' version '3.0.4' id…
Arshad Ali
  • 3,082
  • 12
  • 56
  • 99
0
votes
1 answer

How to pass additional arguments to npm task via Gradle command line?

Assume in my package.json I have a task named "xxx". Using npm itself, I can run it as follows: npm run xxx. I also can run it with additional arguments in the following way: npm run xxx -- more arguments for xxx. Using gradle-node-plugin, I can run…
ivan.ukr
  • 2,853
  • 1
  • 23
  • 41
0
votes
1 answer

gradle nod set up fails installing node x86_64

I'm using gradle node plugin for my project and when I run the nodeSetup task it tries to install the node dist from https://nodejs.org/dist/v12.6.0/node-v12.6.0-darwin-x86_64.tar.gz which I know does not exists. The correct URL should be…
Kai-Eiji
  • 75
  • 6
0
votes
1 answer

Gradle node plugin behind proxy not resolving registry url

I am using gradle node plugin behind corporate proxy with our own artifactory url but plugin is not able to download the node dist and hence the build is failing. As per plugin added the below code node { version = '10.15.3' npmVersion =…
Rinsen S
  • 461
  • 3
  • 10
  • 26
0
votes
1 answer

How do I migrate "yarn run-script build" task from frontend-maven-plugin to gradle?

I use gradle-node-plugin instead of frontend-maven-plugin. "yarn run-script build" task in maven is written such as following yarn run-script build yarn