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 command换成绝对路径
报错:/usr/bin/env: node: No such file or directory
解决办法:
添加node软链接:
ln -s /usr/local/node/bin/node /usr/bin/node
如果还是不行,在commond前面加上:
#!/bin/bash -ilex
Jenkins中shell-script执行报错sh: line 2: npm: command not found的更多相关文章
- windows中修改catalina.sh上传到linux执行报错This file is needed to run this program解决
windows中修改catalina.sh上传到linux执行报错This file is needed to run this program解决 一.发现问题 由于tomcat内存溢出,在wind ...
- Ubuntu下sh *.sh使用==操作符执行报错
----<鸟哥的Linux私房菜--基础篇>学习笔记 ubuntu默认的sh是连接到dash,而我们写shell脚本时使用的时bash.bash和dash在一些方面是不兼容的.因此执行同一 ...
- SQL server 维护计划中 “清除维护任务” 执行报错
SQL server 维护计划中 “清除维护任务” 执行报错,错误如下: 执行查询“EXECUTE master.dbo.xp_delete_file 0,N'',N'',N'2019...”失败,错 ...
- [原]在使用ubuntu14.04,安装devstack的时候报错./stack.sh: line 463: generate-subunit: command not found
=======在使用ubuntu14.04,安装devstack的时候报错./stack.sh: line 463: generate-subunit: command not found 2016- ...
- Jmeter录制脚本过程及Could not create script recorder报错、您的连接不是私密连接报错
转载自 https://www.cnblogs.com/wwho/p/7173172.html Jmeter录制脚本过程及Could not create script recorder报错.您 ...
- 二、Jmeter录制脚本过程及Could not create script recorder报错、您的连接不是私密连接报错
两个报错:Could not create script recorder报错和您的连接不是私密连接报错 1.录制过程 * 打开jmeter * 点击Templated,选择Recoding模版 * ...
- Shell脚本运行报错Bad substitution解决办法
环境Ubuntu18.4.02 脚本运行报错 # sh test.sh test.sh: 2: test.sh: Bad substitution 原因 从 ubuntu 6.10 开始,ubuntu ...
- RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found
RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found 在多台Linux服务器SSH相互访问无需密码, 其中进入一台Linus中,对其 ...
- 安装PHP过程中,make步骤报错:(集合网络上各种解决方法)
安装PHP过程中,make步骤报错:(集合网络上各种解决方法) (1)-liconv -o sapi/fpm/php-fpm /usr/bin/ld: cannot find -liconv coll ...
随机推荐
- screen的安装使用
安装 yum install -y screen [root@instance-- ~]# screen --help Use: screen [-opts] [cmd [args]] or: scr ...
- [Python]Python3调用java代码
环境:Ubuntu16.04 桌面版 Ubuntu安装java的详细教程:https://www.cnblogs.com/ttkl/p/11933884.html 安装JPype1 pip3 inst ...
- Windows下如何禁止优盘自动播放、自动运行
造冰箱的大熊猫@cnblogs 2019/1/28 为了防范层出不穷的病毒和木马,如何禁止插入优盘后Windows自动播放优盘或运行优盘程序? 运行环境:Windows 7 1)点击Windows开 ...
- numpy中np.max() 和 np.maximum() 的区别
np.max(a, axis=None, out=None, keepdims=False) # 接收一个参数a # 取a 在 axis方向上的最大值 np.maximum(x, y) # 接收两个参 ...
- Konrad and Company Evaluation
F. Konrad and Company Evaluation 参考:[codeforces 1230F]Konrad and Company Evaluation-暴力 思路:题意分析见参考博客. ...
- IDEA如何配置jdk路径
首先要确定你的jdk已经安装好了 Win + R键,输入cmd 输入java -version 当返回这玩意的时候,就证明你的jdk已经安装成功,可以用IDEA进行配置了 打开IDEA的 File → ...
- eclipse外部导入Javaweb项目时,项目上出现红叉的一个可能的解决办法
解决办法:http://blog.csdn.net/qq_32671287/article/details/52467885 进入项目包下的.settings目录,找到org.eclipse.wst. ...
- 一本学习HTTP很好的书《图解HTTP》
网上电子版的一堆(*^__^*) 嘻嘻……
- git忽略提交:.gitignore
在使用Git的过程中,我们喜欢有的文件比如日志,临时文件,编译的中间文件等不要提交到代码仓库,这时就要设置相应的忽略规则,来忽略这些文件的提交. Git 忽略文件提交的方法 有三种方法可以实现忽略Gi ...
- This sample is for changing from “float64” to “int” for values did unmarshal using map[string]interface{}. When it did unmarshal using map[string]interface{}, a number with “int” was changed to “floa
This sample is for changing from “float64” to “int” for values did unmarshal using map[string]interf ...