Jenkins中shell-script执行报错sh: line 2: npm: command not found
<1>本地执行npm run build--正常<2>查看环境变量--正常[root@localhost bin]# echo $PATH/usr/local/node/bin:/usr/local/nginx/sbin:/usr/local/node/bin:<3>将shell中的script的npm comma
·
<1>本地执行npm run build--正常
<2>查看环境变量--正常
[root@localhost bin]# echo $PATH
/usr/local/node/bin:/usr/local/nginx/sbin:/usr/local/node/bin:
<3>将shell中的script的npm command换成绝对路径
报错:/usr/bin/env: node: No such file or directory
<4>添加node软链接:
ln -s /usr/local/node/bin/node /usr/bin/node
<5>Jenkins构建编译OK
更多推荐
已为社区贡献3条内容
所有评论(0)