admin管理员组文章数量:1321612
Error: Cannot find module 'underscore' thrown in console for all Meteor mands
After every meteor or meteorite mand such as meteor
or mrt create myapp
the following error is thrown. This error seemed to appear suddenly, as meteor was functional the night before and no changes have been made since.
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 have tried installing underscore manually with sudo npm install -g underscore
which returns
Austins-MacBook-Pro:Projects austinrivas$ sudo npm install -g underscore
Password:
npm http GET
npm http 200
npm http GET .5.2.tgz
npm http 200 .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
[email protected] /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've even tried reinstalling node and doing an npm cache clean
but I'm not sure what else to try.
Any further insight would 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
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected]
Error: Cannot find module 'underscore' thrown in console for all Meteor mands
After every meteor or meteorite mand such as meteor
or mrt create myapp
the following error is thrown. This error seemed to appear suddenly, as meteor was functional the night before and no changes have been made since.
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 have tried installing underscore manually with sudo npm install -g underscore
which returns
Austins-MacBook-Pro:Projects austinrivas$ sudo npm install -g underscore
Password:
npm http GET https://registry.npmjs/underscore
npm http 200 https://registry.npmjs/underscore
npm http GET https://registry.npmjs/underscore/-/underscore-1.5.2.tgz
npm http 200 https://registry.npmjs/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
[email protected] /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've even tried reinstalling node and doing an npm cache clean
but I'm not sure what else to try.
Any further insight would 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
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected]
Share
Improve this question
edited Sep 8, 2013 at 1:23
asked Sep 7, 2013 at 23:30
user2264433user2264433
4
- Do you get this: mrt --version Meteorite version 0.6.11 Release 0.6.5.1 – Jim Mack Commented Sep 8, 2013 at 0:03
-
when I
mrt --version
I getMeteorite version 0.6.11
then it hangs for a momment and I get the same error – user2264433 Commented Sep 8, 2013 at 1:13 - Then it is meteor itself which should be reinstalled. Does "node --version" work? Something like 10.17... – Jim Mack Commented Sep 8, 2013 at 2:36
-
@JimMack yes
node --version
works fine, it returnv0.10.18
. I'm going to try reinstallingmeteor
again. – user2264433 Commented Sep 8, 2013 at 22:08
2 Answers
Reset to default 7I was able to resolve this error by pletely uninstalling / reinstalling meteor
and meteorite
through 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. | /bin/sh
sudo -H npm install -g meteorite
I was able to verifying everything was working properly by running meteor --version
and mrt create test-app
First off, your meteorite is out of date. To update meteorite run (sudo if applicable):
npm update -g meteorite
If you ran the 'mrt' or 'meteor' mand as sudo in the past, it will cause issues. Clear meteorite by running:
sudo mrt uninstall
sudo mrt uninstall --system
sudo chown -R `whoami` ~/.npm
You also want to remove the 'build' folder inside existing projects, located in '/project/.meteor/local/build'
版权声明:本文标题:javascript - Error: Cannot find module 'underscore' thrown in console for all Meteor commands - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742104686a2420964.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论