重新安装npm哟离子错误

我摆弄npm从头重新安装,因为依赖问题,所以我跑rm -rf ~/.npm

然后运行npm install -g npm然后npm install -g chai mocha yo generator-ionic最后一次安装失败,发生器 – 离子与以下错误:

 npm WARN generator-ionic@0.8.0 requires a peer of yo@>=1.0.0 but none was installed. npm ERR! Darwin 15.2.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator-ionic" npm ERR! node v4.2.4 npm ERR! npm v3.5.2 npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-8ba0f614 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-8ba0f614' -> '/usr/local/lib/node_modules/generator-ionic/node_modules/npm/node_modules/abbrev' npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-8ba0f614' -> '/usr/local/lib/node_modules/generator-ionic/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: npm ERR! /Users/donjohnson/ionic-nom/npm-debug.log npm ERR! code 1 

如果我运行yo ionic发生以下错误:

 events.js:141 throw er; // Unhandled 'error' event ^ Error: Cannot find module 'child-process-close' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:289:25) at Module.require (module.js:366:17) at require (module.js:385:17) at /usr/local/lib/node_modules/generator-ionic/node_modules/npm/lib/npm.js:15:1 at Object.<anonymous> (/usr/local/lib/node_modules/generator-ionic/node_modules/npm/lib/npm.js:518:3) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:313:12) 

我相当肯定我搞砸了文件结构,但我不知道如何解决这个问题,或者如何正确地删除所有的组件,从头开始。

Interesting Posts