我得到上面的標題中提到的錯誤,在我的OSX安裝HTTP服務器節點http服務器 - HTTP:找不到命令
npm install http-server -g
之後它在
/usr/local/bin/http-server -> /usr/local/lib/node_modules/http-server/bin/http-server
/usr/local/bin/hs -> /usr/local/lib/node_modules/http-server/bin/http-server
/usr/local/lib
我試着安裝了它加上路徑,因爲我看到了作爲一個建議here這樣
PATH=$PATH:/usr/local/lib/node_modules/http-server
我已經運行了錯誤的命令,而不是我輸入http服務器 – Marco
做'$ hs'工作的HTTP服務器解決了這個問題? –
@Marco你找到了解決方案嗎? – davelowe85