Plugin doesn't work when npm isn't globally installed
When npm is globally installed everything works fine. But when using a local npm, the task npmSetup fails with the error:
21702 error Linux 3.13.0-86-generic
21703 error argv "/home/vagrant/share/npm-test/.gradle/nodejs/node-v6.2.1-linux-x64/bin/node" "/home/vagrant/share/npm-test/.gradle/nodejs/node-v6.2.1-linux-x64/lib/node_modules/npm/bin/npm-cli.js" "install" "[email protected]"
21704 error node v6.2.1
21705 error npm v3.9.3
21706 error path /home/vagrant/share/npm-test/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign
21707 error code ENOENT
21708 error errno -2
21709 error syscall chmod
21710 error enoent ENOENT: no such file or directory, chmod '/home/vagrant/share/npm-test/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign'
21711 error enoent ENOENT: no such file or directory, chmod '/home/vagrant/share/npm-test/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign'
21711 error enoent This is most likely not a problem with npm itself
21711 error enoent and is related to npm not being able to find a file.
21712 verbose exit [ -2, true ]
build.gradle:
plugins {
id "com.moowork.node" version "0.13"
}
node {
version = '6.2.1'
npmVersion = '3.9.3'
download = true
}
The name of my project is npm-test and it (obviously) does not contain a node_modules folder.
I think it should use the npm installed in npm-test\.gradle\nodejs\node-v6.2.1-linux-x64\lib\node_modules\npm
Is it possible that this PR fixes my problem: https://github.com/srs/gradle-node-plugin/pull/78 Otherwise other suggestions to resolve this?
I have this issue on a Linux Machine.
When I run on Windows and (download = true in build.gradle) it succeeds. Please mind that on Windows I have npm installed globally. But I assume it uses the local one because of this message:
npm WARN prefer global [email protected] should be installed with -g
Hi! Is there any update for this ticket?
Is this still an issue? I got a local node install and use both this plugin and the community fork just fine