Skip to content

Plugin doesn't work when npm isn't globally installed #139

@rachid-o

Description

@rachid-o

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: #78
Otherwise other suggestions to resolve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions