zsh: command not found: modernizr

ぐ巨炮叔叔 提交于 2019-12-12 03:22:19

问题


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

After install running: modernizr I get:

zsh: command not found: modernizr

In my .zshrc file I have:

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

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

When I type which npm I get /usr/local/bin/npm

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?


回答1:


Change PATH export to

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

You can also remove the double quotes.



来源:https://stackoverflow.com/questions/34672804/zsh-command-not-found-modernizr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!