Error: Cannot find underline module thrown to console for all Meteor commands

Error: cannot find the 'underscore' module thrown into the console for all Meteor commands

After each meteor or meteorite command, such as meteor or mrt create myapp , the following error is mrt create myapp . This error seemed to appear suddenly, as the meteorite functioned the day before, and since then there have been no changes.

 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 

I tried to set the underline manually using sudo npm install -g underscore , which returns

 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 

My ~ / .bash_profile has the following paths

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

I even tried reinstalling node and doing npm cache clean , but I'm not sure what else to try.

Any further understanding will be appreciated.

UPDATE

Running npm list -g underscore returns the following

 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 
+4
source share
2 answers

I managed to fix this error by completely uninstalling / reinstalling meteor and meteorite using the following steps.

 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 

I was able to verify that everything works correctly by running meteor --version and mrt create test-app

+7
source

Firstly, your meteorite is out of date. To update the meteorite mileage (sudo, if applicable):

 npm update -g meteorite 

If you run the "mrt" or "meteor" command as sudo in the past, this will cause problems . Clear a meteorite by doing:

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

You also want to delete the 'build' folder inside existing projects located in '/project/.meteor/local/build'

0
source

Source: https://habr.com/ru/post/1501117/


All Articles