node-gradle / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
601 stars 117 forks source link

using NPM 'install' exits with error code #249

Closed nskmda closed 1 year ago

nskmda commented 1 year ago

Windows 10, Gradle 7.5.1, Amazon JDK 11

Trying to follow documentation directions. Have empty 'package.json' and trying to extend the NpmTask like in the documentation:

task installPackages(type: NpmTask) {
  args = ['install', 'webpack']
}

One issue is it's running very-very long. And at the end I receive the following error:

> Process 'command 'C:\Projects\react\.gradle\nodejs\node-v16.17.1-win-x64\npm.cmd'' finished with non-zero exit value 1

Running Gradle task w/--debug --stacktrace didn't help much. Except for the stacktrace there's no other information telling me what exactly failed.

Any suggestions what I'm doing wroing?

nskmda commented 1 year ago

Switching to the discussions.