[英]ZSH command not found
I realize this question has been asked a ton, but I feel like I've tried everything.我意识到这个问题已经被问到了很多,但我觉得我已经尝试了一切。 I haven't had any issues with node or npm for months up until now.
直到现在,我几个月来都没有遇到 node 或 npm 的任何问题。 I am following Airtable Hello World Tutorial .
我正在关注Airtable Hello World 教程。 I attached screenshots to save you time.
我附上了屏幕截图以节省您的时间。 They instruct you to:
他们指示您:
Download their npm package with npm install -g @airtable/blocks-cli
.使用
npm install -g @airtable/blocks-cli
下载他们的 npm 包。
Then run (x's and y's are for authorization.)然后运行(x 和 y 用于授权。)
block init xxxxxxxxx/yyyyyyyyyyyyy --template=https://github.com/Airtable/blocks-hello-world hello_world
This is where the issues start.这就是问题开始的地方。 I get an error that says
zsh: command not found: block
.我收到一条错误消息,指出
zsh: command not found: block
。
source ~/.bash_profile
tp ,my ~/.zshrc
source ~/.bash_profile
tp ,我的~/.zshrc
~/.zshrc
~/.zshrc
添加别名npm@6.13.4 /usr/local/lib/node_modules/npm
When I run echo $PATH
I get:当我运行
echo $PATH
我得到:
/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/{MY_NAME}/npm/bin
When I run which zsh
I get:当我运行
which zsh
我得到:
/usr/local/bin/zsh
When I run which npm
I get:当我运行
which npm
我得到:
/usr/local/bin/npm
When I run npm list -g | head -n 1
当我运行
npm list -g | head -n 1
npm list -g | head -n 1
I get: npm list -g | head -n 1
我得到:
/Users/{MY_NAME}/.npm-global/lib
I fixed this problem by using nvm to install node.我通过使用 nvm 安装节点解决了这个问题。 It's much easier to use and I haven't run into these issues anymore.
它更容易使用,而且我不再遇到这些问题。
Here is the link: https://github.com/nvm-sh/nvm这是链接: https : //github.com/nvm-sh/nvm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.