zsh:找不到命令:modernizr [英] zsh: command not found: modernizr

查看:70
本文介绍了zsh:找不到命令:modernizr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 Modernizr:npm install -g modernizr一切顺利,没有错误:/Users/myusername/npm/bin/modernizr ->/Users/myusername/npm/lib/node_modules/modernizr/bin/modernizr/Users/myusername/npm/lib

I installed modernizr: npm install -g modernizr Everything went well without errors: /Users/myusername/npm/bin/modernizr -> /Users/myusername/npm/lib/node_modules/modernizr/bin/modernizr /Users/myusername/npm/lib

安装运行后:modernizr 我得到:

After install running: modernizr I get:

zsh:找不到命令:modernizr

zsh: command not found: modernizr

在我的 .zshrc 文件中,我有:

In my .zshrc file I have:

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

在谷歌搜索后找到这个帖子:Bower:找不到命令"安装后并将这一行添加到我的 .zshrc 文件中:export PATH=/usr/local/share/npm/bin:$PATH

After googling around find this post: Bower: "command not found" after installation and added this line to my .zshrc file: export PATH=/usr/local/share/npm/bin:$PATH

当我输入 which npm 我得到 /usr/local/bin/npm

但我仍然找不到命令.我使用 Mac Finder 检查了文件,并在 myusername/npm/node_modules/modernizer 中找到了 Modernizer - 这应该是对的?如何修复找不到 zsh 命令?

But I'm still getting command not found. I checked files with Mac Finder and found modernizer in myusername/npm/node_modules/modernizer - this should be right? How to fix zsh command not found?

推荐答案

将 PATH 导出更改为

Change PATH export to

export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/npm/bin

您也可以删除双引号.

这篇关于zsh:找不到命令:modernizr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆