错误:无法find所有Meteor命令在控制台中引发的模块“下划线”

错误:无法find所有Meteor命令在控制台中引发的模块“下划线”

在每一个meteor陨石命令,如meteormrt create myapp ,抛出以下错误。 这个错误似乎突然出现,因为meteor在前一天晚上是function性的,从那以后没有任何改变。

 Austins-MacBook-Pro:Projects austinrivas$ mrt create test-app /Users/austinrivas/.meteor/tools/3cba50c44a/tools/meteor.js:1480 }).run(); ^ Error: Cannot find module 'underscore' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:362:17) at require (module.js:378:17) at /Users/austinrivas/.meteor/tools/3cba50c44a/tools/meteor.js:10:11 

我已经尝试用sudo npm install -g underscore手动sudo npm install -g underscore返回

 Austins-MacBook-Pro:Projects austinrivas$ sudo npm install -g underscore Password: npm http GET https://registry.npmjs.org/underscore npm http 200 https://registry.npmjs.org/underscore npm http GET https://registry.npmjs.org/underscore/-/underscore-1.5.2.tgz npm http 200 https://registry.npmjs.org/underscore/-/underscore-1.5.2.tgz npm WARN unmet dependency /usr/local/share/npm/lib/node_modules/phonegap/node_modules/cordova requires colors@'>=0.6.0' but will load npm WARN unmet dependency /usr/local/share/npm/lib/node_modules/phonegap/node_modules/colors, npm WARN unmet dependency which is version 0.6.0-1 npm WARN unmet dependency /usr/local/share/npm/lib/node_modules/phonegap/node_modules/node-static requires colors@'>=0.6.0' but will load npm WARN unmet dependency /usr/local/share/npm/lib/node_modules/phonegap/node_modules/colors, npm WARN unmet dependency which is version 0.6.0-1 underscore@1.5.2 /usr/local/share/npm/lib/node_modules/underscore 

我的〜/ .bash_profile有以下path

 export PATH=/usr/local/share/npm/bin:$PATH export NODE_PATH="/usr/local/share/npm/lib/node_modules" export NODE_OPTIONS="--debug" 

我甚至尝试重新安装节点,并做一个npm cache clean但我不知道还有什么要尝试。

任何进一步的见解将不胜感激。

UPDATE

运行npm list -g underscore返回以下内容

 Austins-MacBook-Pro:~ austinrivas$ npm list -g underscore npm WARN unmet dependency /usr/local/share/npm/lib/node_modules/phonegap/node_modules/cordova requires colors@'>=0.6.0' but will load npm WARN unmet dependency /usr/local/share/npm/lib/node_modules/phonegap/node_modules/colors, npm WARN unmet dependency which is version 0.6.0-1 npm WARN unmet dependency /usr/local/share/npm/lib/node_modules/phonegap/node_modules/node-static requires colors@'>=0.6.0' but will load npm WARN unmet dependency /usr/local/share/npm/lib/node_modules/phonegap/node_modules/colors, npm WARN unmet dependency which is version 0.6.0-1 /usr/local/share/npm/lib ├─┬ meteorite@0.6.11 │ ├─┬ ddp@0.3.4 │ │ └─┬ meteor-ejson@0.6.3 │ │ └── underscore@1.4.4 │ └── underscore@1.5.1 ├─┬ phonegap@3.0.0-0.14.0 │ └─┬ cordova@3.0.0 │ ├─┬ follow-redirects@0.0.3 │ │ └── underscore@1.5.1 │ └─┬ plugman@0.9.10 │ ├─┬ dep-graph@1.1.0 │ │ └── underscore@1.2.1 │ └── underscore@1.4.4 ├── underscore@1.5.2 └─┬ ungit@0.1.8 └── underscore@1.4.4 

       

网上收集的解决方案 "错误:无法find所有Meteor命令在控制台中引发的模块“下划线”"

我可以通过以下步骤彻底卸载/重新安装meteormeteorite来解决这个错误。

 sudo rm /usr/local/bin/meteor rm -rf ~/.meteor sudo mrt uninstall sudo mrt uninstall --system sudo chown -R `whoami` ~/.npm curl https://install.meteor.com | /bin/sh sudo -H npm install -g meteorite 

我能够通过运行meteor --version来validation一切正常工作meteor --versionmrt create test-app

首先,你的陨石已经过时了。 更新陨石运行(sudo,如果适用):

 npm update -g meteorite 

如果你过去像sudo那样运行'mrt'或'meteor'命令, 会导致问题 。 运行清除陨石:

 sudo mrt uninstall sudo mrt uninstall --system sudo chown -R `whoami` ~/.npm 

您还想要删除位于“/project/.meteor/local/build”中的现有项目中的“build”文件夹,