当前位置:网站首页>automation - Jenkins pipline 执行 nodejs 命令时,提示 node: command not found
automation - Jenkins pipline 执行 nodejs 命令时,提示 node: command not found
2022-07-02 06:22:00 【原小明】
遇见的问题描述:最近使用 jenkins pipline 部署前端项目的时候,执行 node 命令,发现怎么都执行不了,而登录服务器的时候,可以正常执行,而且环境变量进行了配置的,后请教了大神杨 说是软连接的问题,后进行设置后,就可以执行了;
为什么 java 命令可以执行,而node命令就要设置软连接呢?
请在评论告诉我。
解决
通过ln命令设置node和npm的软连接
ln -s /XX/bin/node(下载的node.js中的node) /usr/local/bin/node(软连接的node)
ln -s /XX/bin/npm(下载的node.js中的npm) /usr/local/bin/npm(软连接的npm)
边栏推荐
猜你喜欢
随机推荐
底层机制Mvcc
10 erreurs classiques de MySQL
The intern left a big hole when he ran away and made two online problems, which made me miserable
In depth understanding of JUC concurrency (II) concurrency theory
New version of dedecms collection and release plug-in tutorial tool
分布式事务 :可靠消息最终一致性方案
Arduino Wire 库使用
Flask-Migrate 检测不到db.string() 等长度变化
深入学习JVM底层(二):HotSpot虚拟机对象
LeetCode 39. 组合总和
重载全局和成员new/delete
BGP报文详细解释
Contest3147 - game 38 of 2021 Freshmen's personal training match_ E: Listen to songs and know music
Invalid operation: Load into table ‘sources_ orderdata‘ failed. Check ‘stl_ load_ errors‘ system table
Redis——Cluster数据分布算法&哈希槽
VRRP之监视上行链路
TensorRT的数据格式定义详解
利用NVIDIA GPU将Minecraft场景渲染成真实场景
程序员的自我修养—找工作反思篇
CUDA与Direct3D 一致性