0
Node.jsを5.xに更新した後、npm installを使用できません。これを使用するたびに、エラーが発生します:更新後にnpm installを使用することはできません。Node.js
$ npm install react-motion
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "am2"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code EINVALIDTYPE
npm ERR! typeerror Error: Argument #1: Expected string but got object
npm ERR! typeerror at markDeps (/usr/local/lib/node_modules/npm/lib/install/deps.js:87:5)
npm ERR! typeerror at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
npm ERR! typeerror at Array.forEach (native)
npm ERR! typeerror at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
npm ERR! typeerror at Array.forEach (native)
npm ERR! typeerror at asyncMap (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
npm ERR! typeerror at Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
npm ERR! typeerror at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
npm ERR! typeerror at chain (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
npm ERR! typeerror at recalculateMetadata (/usr/local/lib/node_modules/npm/lib/install/deps.js:112:3)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR!
とnpm installはもう動作しません。ノードの以前のバージョンに戻ることはできません!
$ sudo -i
# npm install -g n // causes same errors!
# n 4.4.2; // not working anymore.
node.jsを完全に再インストールする必要がありますか?または私はそれを修正することはできますか?どんなアドバイスも非常に感謝しています。既存のパッケージを再構築しようとすることができ
rm -rf ~/.npm
npm cache clear
次のステップ::また
npm rebuild
みんなが言う最初であなたのNPMのキャッシュをきれいにする