I am currently trying to establish a simple Jenkins test and deploy on Cloudbees for a new application. Currently I'm just trying to get the test to work. Most of the Jenkins settings and plugins should be configured so that it should run correctly (Github works etc.) and I've ticked the
"Provide Node & npm bin/ folder to PATH"
checkbox, as I need the npm to install some dependencies. The Execute shell -setting has the following
echo $PATH
./buildui.sh
buildui.sh has command "npm install" in it. However when I run the build, it is saying that npm: command not found. I found this, which I tried after unticking the previous npm-checkbox. Different versions of npm give different problems, but I've used 11.8 mostly as it seems to be the most recent one. With following Execute shell:
echo $PATH
curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
NODE_VERSION=0.11.8 . ./use-node
npm install less
./buildui.sh
I get the following error (full stacktrace can be found here
In file included from ../binding.cpp:1:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Signature> NanNew(v8::Handle<v8::FunctionTemplate>, int, v8::Handle<v8::FunctionTemplate>*)’:
../node_modules/nan/nan.h:189:78: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*&, v8::Handle<v8::FunctionTemplate>&, int&, v8::Handle<v8::FunctionTemplate>*&)’
Seems to be a problem with node-sass, however with other version numbers there are some other errors like
TypeError: Property 'onIncoming' of object #<HTTPParser> is not a function
at HTTPParser.parserOnHeadersComplete (_http_common.js:110:23)
Google only gives a handful of results from these errors, none of which directly help me. Similar issue is discussed here, but it's not exactly the same and also doesn't provide that much help.
I think that Cloudbees doesn't provide a Shell Access that would make it easier to run certain commands? Anyone know what might help with this issue? Thanks :)