我使用nvm下載節點v0.4.10,并安裝了npm以與該版本的節點一起使用。我正在嘗試使用安裝Expressnpm install express -g我得到一個錯誤,表示需要節點版本> = 0.5.0。好吧,這很奇怪,因為我遵循此處使用節點v0.4.10 的node + express + mongodb教程的說明,因此我假設express可用于節點v0.4.10。如果我的假設是正確的,我如何告訴npm獲取適用于我的設置的版本?
3 回答

哈士奇WWW
TA貢獻1799條經驗 獲得超6個贊
這很容易。只需編寫此代碼,例如:
npm install -g [email protected]
要么:
npm install -g npm@latest // For the last stable version
npm install -g npm@next // For the most recent release

慕田峪4524236
TA貢獻1875條經驗 獲得超5個贊
首先刪除舊版本,然后運行字面上以下幾點:
npm install [email protected]
并且穩定或最近
npm install -g npm@latest // For the last stable version
npm install -g npm@next // For the most recent release
- 3 回答
- 0 關注
- 654 瀏覽
添加回答
舉報
0/150
提交
取消