我測試ionic2和安裝的節點,NPM和科爾多瓦和它一直工作正常。但是,在更新npm後,我無法安裝任何npm軟件包。因此,我根據How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)刪除了所有與node和npm相關的目錄,並重新安裝了node-v6.9.1。但是,這一次再次,當我試圖安裝使用「sudo的NPM安裝-g離子科爾多瓦」科爾多瓦,它給了我一個錯誤:ionic2科爾多瓦安裝錯誤 - ENOENT
$ rm -rf ~/.npm
$ npm cache clear
$ sudo npm install -g ionic cordova
npm WARN deprecated [email protected]: use uuid module instead
/usr/local/lib
└── [email protected]
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic" "cordova"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-ef9cc920
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-ef9cc920' -> '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-ef9cc920' -> '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
我一直在#2谷歌搜索和其他的問題,但解決不了問題呢。我正在使用macOS Seira 10.12.1。
這是一個NPM錯誤或我的錯?有沒有可能的解決方案來解決這個問題?
謝謝你幫助我。