[英]Unable to install ionic on MacBook Pro using npm install -g cordova ionic?
我以管理員用戶身份登錄。 我已經使用node-v6.9.1.pkg文件從https://nodejs.org/en/安裝了最新的node.js。 我已經為所有用戶安裝了它。
當我嘗試執行離子側( https://ionicframework.com/getting-started/ )上給出的以下命令時:
npm install -g cordova ionic
我也嘗試了使用sudo
上述命令,但出現了如下錯誤:
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'github-url-from-git'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/myusername/npm-debug.log
我是Mac的新手,可能是什么原因?
看來這是一個nodejs問題。 跟着這些步驟:
1)rm -rf / usr / local / lib / node_modules / npm
2)重新安裝nodejs
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.