yarn: command not found
程序员文章站
2022-05-29 09:09:14
...
今天在bash中使用npm(6.9.0)安装 yarn 。安装是成功了,但无法使用yarn 命令,提示如下:
[[email protected] /]# yarn -version
bash: yarn: 未找到命令
百度、谷歌后折腾了一番才解决,其实很简单,不过查到了方法但全英文不好理解,这里记一下
安装yarn 后如下,记住yarn 路径并添加到 $PATH
中
[[email protected] /]# npm install -g yarn
npm WARN rm not removing /usr/local/node-v10.15.0/bin/yarn as it wasn't installed by /usr/local/node-v10.15.0/lib/node_modules/yarn
/usr/local/node-v10.15.0/bin/yarn -> /usr/local/node-v10.15.0/lib/node_modules/yarn/bin/yarn.js
+ [email protected]
updated 1 package in 2.874s
[[email protected] bin]# export PATH=/usr/local/node-v10.15.0/bin/:$PATH
[[email protected] bin]# echo $PATH
/usr/local/node-v10.15.0/bin/:/root/.yarn/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/hzero/.local/bin:/home/hzero/bin:
[[email protected] hzero-front]# yarn -version
1.13.0
上一篇: C++修改植物大战僵尸阳光
推荐阅读
-
电脑开机出现异常提示keyboard not found的故障原因及解决方法
-
linux下配置lamp时候出现The requested URL /info.php was not found on this server问题
-
如何找到Hive提交的SQL相对应的Yarn程序的applicationId
-
WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
-
spring boot Invalid bound statement (not found)
-
Hive启动报错: Found class jline.Terminal, but interface was expe
-
mac上adb command not found
-
HTTP 错误 404.3 - Not Found
-
C - Write the program expr which evaluates a reverse Polish expression from the command line
-
PHP localhost Not Found