找不到“内容丰富”的命令

时间:2019-05-05 08:40:41

标签: node.js npm contentful

我正在遵循此getting started guide,尽管运行了brew upgrade node并且在应该安装的地方安装了contentful-cli工具,但还是遇到了这个问题。任何想法为什么会发生这种情况?

~/Development/misc-dev/travel-blog(master):0 npm i -g contentful-cli  
npm WARN deprecated joi@13.7.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated hoek@5.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated joi@10.6.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo@2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated items@2.1.2: This module has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version of hapi to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
/usr/local/Cellar/node/11.14.0/bin/contentful -> /usr/local/Cellar/node/11.14.0/lib/node_modules/contentful-cli/bin/contentful.js

> spawn-sync@1.0.15 postinstall /usr/local/Cellar/node/11.14.0/lib/node_modules/contentful-cli/node_modules/spawn-sync
> node postinstall

+ contentful-cli@0.26.4
added 490 packages from 231 contributors in 20.129s

~/Development/misc-dev/travel-blog(master):0 contentful --help      
zsh: command not found: contentful

1 个答案:

答案 0 :(得分:0)

我必须将export PATH="/usr/local/Cellar/node/11.14.0/bin:$PATH"添加到我的.zshrc文件中,因为安装的brew节点程序包不是我的$PATH变量的一部分。运行npm bin -g可以帮助我找到全局软件包的安装位置,并为我确认了这一点。谢谢@Tico的指导。