srs / gradle-node-plugin

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

Build fails with "> Process 'command '.../.gradle/npm/npm-v6.13.0/bin/npm'' finished with non-zero exit value 134" #356

Closed hovinen closed 4 years ago

hovinen commented 4 years ago

My Gradle build is failing in the task npmSetup:

Starting process 'command '.../.gradle/npm/npm-v6.13.0/bin/npm''. Working directory: ... Command: .../.gradle/npm/npm-v6.13.0/bin/npm install --global --no-save --prefix .../.gradle/npm/npm-v6.13.0 npm@6.13.0
Successfully started process 'command '.../.gradle/npm/npm-v6.13.0/bin/npm''
.../.gradle/npm/npm-v6.13.0/bin/npm -> .../.gradle/npm/npm-v6.13.0/lib/node_modules/npm/bin/npm-cli.js
.../.gradle/npm/npm-v6.13.0/bin/npx -> .../.gradle/npm/npm-v6.13.0/lib/node_modules/npm/bin/npx-cli.js
+ npm@6.13.0
updated 1 package in 4.109s

> Task :frontend:npmSetup FAILED
:frontend:npmSetup (Thread[Execution worker for ':',5,main]) completed. Took 4.578 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':frontend:npmSetup'.
> Process 'command '.../.gradle/npm/npm-v6.13.0/bin/npm'' finished with non-zero exit value 134

When I run the same command as indicated above manually in the same working directory, no error of any kind is reported, the npm output is the same as printed during the Gradle run, and, the exit status is 0.

What am I doing incorrectly here so that the command only fails (and then completely silently) when Gradle runs it?

My build.gradle file for reference: build.gradle.txt

deepy commented 4 years ago

Googling exit code 134 seems to be out of memory which seems strange, is this a box with little memory? Could you test with id "com.github.node-gradle.node" version "2.2.0" it's the fork but I'm curious if we have the same issue.

hovinen commented 4 years ago

Hi Alex,

Thanks for your reply.

I've replaced "id 'com.moowork.node' version '1.3.1'" with "id 'com.github.node-gradle.node' version '2.2.0'" in my build.gradle, but the change had no effect.

My system has 8 GB, which I would imagine should suffice to run this. Could there be a limit imposed by Gradle on npm?

Best regards,

Bradford

Am Do., 14. Nov. 2019 um 12:40 Uhr schrieb Alex Nordlund < notifications@github.com>:

Googling exit code 134 seems to be out of memory which seems strange, is this a box with little memory? Could you test with id "com.github.node-gradle.node" version "2.2.0" it's the fork but I'm curious if we have the same issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/srs/gradle-node-plugin/issues/356?email_source=notifications&email_token=AAERZA6PQFPV3JWWS6YORKDQTU2J7A5CNFSM4JNKAAW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEBROOA#issuecomment-553850680, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERZA67EASBY5WJXGBPORLQTU2J7ANCNFSM4JNKAAWQ .

kappelmi commented 4 years ago

Hi are u running this script on alpine linux? if yes, u might have the same issue as i am having, see: #357

Regards Istvan

hovinen commented 4 years ago

Hi Istvan,

No, I'm running on Debian. From the error messages I see it doesn't look like the same issue to me.

Best regards,

Bradford

Am Mo., 25. Nov. 2019 um 10:05 Uhr schrieb Istvan Kappelmayer < notifications@github.com>:

Hi are u running this script on alpine linux? if yes, u might have the same issue as i am having, see: #357 https://github.com/srs/gradle-node-plugin/issues/357

Regards Istvan

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/srs/gradle-node-plugin/issues/356?email_source=notifications&email_token=AAERZA3MKSXKBWCNLVINEBLQVOINNA5CNFSM4JNKAAW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFBUXGA#issuecomment-558058392, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERZA75MZVN2N62CVT5GT3QVOINNANCNFSM4JNKAAWQ .

hovinen commented 4 years ago

Small update: I tried checking the repository out on a separate machine and everything worked fine. So it has something to do with the specific machine I was using and not with the scripts themselves. I'm therefore closing this issue.