我目前正在尝试建立一个简单的 Jenkins 测试并在 Cloudbees 上部署一个新应用程序。目前我只是想让测试正常工作。应该配置大多数 Jenkins 设置和插件,以便它应该正确运行(Github 工作等),我已经勾选了
"Provide Node & npm bin/ folder to PATH"
复选框,因为我需要 npm 来安装一些依赖项。Execute shell -设置具有以下内容
echo $PATH
./buildui.sh
buildui.sh 中有命令“npm install”。但是,当我运行构建时,它说 npm: command not found。我找到了这个,我在取消之前的 npm-checkbox 后尝试过。不同版本的 npm 会出现不同的问题,但我主要使用的是 11.8,因为它似乎是最新的版本。使用以下执行外壳:
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
我收到以下错误(可以在此处找到完整的堆栈跟踪
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>*&)’
似乎是 node-sass 的问题,但是对于其他版本号,还有一些其他错误,例如
TypeError: Property 'onIncoming' of object #<HTTPParser> is not a function
at HTTPParser.parserOnHeadersComplete (_http_common.js:110:23)
谷歌只给出了这些错误的少数结果,没有一个能直接帮助我。此处讨论了类似的问题,但并不完全相同,也没有提供太多帮助。
我认为 Cloudbees 不提供可以更轻松地运行某些命令的 Shell 访问?任何人都知道什么可能有助于解决这个问题?谢谢 :)