我尝试安装http-server
。它安装得很好。这是输出:
$ npm install -g http-server
/Users/jonrojas/.npm-packages/bin/http-server -> /Users/jonrojas/.npm-packages/lib/node_modules/http-server/bin/http-server
/Users/jonrojas/.npm-packages/bin/hs -> /Users/jonrojas/.npm-packages/lib/node_modules/http-server/bin/http-server
/Users/jonrojas/.npm-packages/lib
└── http-server@0.9.0
当我尝试运行hs
时,我得到:
-bash: hs: command not found
当我尝试npm config get prefix
时,我会收到:
/Users/jonrojas/.npm-packages
如何更新我的.bashrc文件以使其正常工作? (或其他步骤?)
注意:这不是http-server
特有的。我还尝试安装另一个具有bash命令的软件包,但它也没有用。