美文网首页
mac npm安装依赖command not found

mac npm安装依赖command not found

作者: 蛋蛋_ff71 | 来源:发表于2019-12-05 09:14 被阅读0次

    -bash: yarn: command not found

    原因:类似于windows没有配置环境变量

    终端输入:

    open -e ~/.bash_profile //上方指令方式将通过记事本直接编辑的方式,或者是采用控制台的vim指令

    touch ~/.bash_profile //touch的意思是没有就创建,.bash_profile为系统临时的环境变量

    open -e ~/.bash_profile //open指令打开这个文件,如果提示没有权限 请在前面加上sudo

    在发开的bash_profile文件中输入例: export PATH=$PATH:/usr/local/node_global/bin //找到安装的依赖的具体目录

    source ~/.bash_profile //source表示重新执行,刷新

    over...

    原文链接:https://www.cnblogs.com/niceyoo/p/11725635.html

    相关文章

      网友评论

          本文标题:mac npm安装依赖command not found

          本文链接:https://www.haomeiwen.com/subject/oaorgctx.html