运行命令时出现以下错误:meteor
[[[[[ C:\projects\employees ]]]]]
=> Started proxy.
=> Started MongoDB.
Unable to resolve some modules:
"loadash" in /C/projects/employees/server/main.js (os.windows.x86_32)
If you notice problems related to these missing modules, consider running:
meteor npm install --save loadash
W20160625-21:00:28.388(1)? (STDERR)
W20160625-21:00:28.628(1)? (STDERR) C:\Users\XPS\AppData\Local\.meteor\packages\meteor-tool\1.3.4_1\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:280
W20160625-21:00:28.637(1)? (STDERR) throw(ex);
W20160625-21:00:28.643(1)? (STDERR) ^
W20160625-21:00:28.650(1)? (STDERR) Error: Can't find npm module 'loadash'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?
W20160625-21:00:28.661(1)? (STDERR) at Object.Npm.require (C:\projects\employees\.meteor\local\build\programs\server\boot.js:203:17)
W20160625-21:00:28.670(1)? (STDERR) at options.fallback (packages/modules-runtime/modules-runtime.js:21:1)
W20160625-21:00:28.680(1)? (STDERR) at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:88:1)
W20160625-21:00:28.686(1)? (STDERR) at Module.Mp.import (C:\Users\XPS\AppData\Local\.meteor\packages\modules\0.6.4\npm\node_modules\reify\lib\runtime.js:70:16)
W20160625-21:00:28.698(1)? (STDERR) at meteorInstall.server.main.js (C:\projects\employees\.meteor\local\build\programs\server\app\app.js:22:20)
W20160625-21:00:28.723(1)? (STDERR) at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
W20160625-21:00:28.731(1)? (STDERR) at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
W20160625-21:00:28.736(1)? (STDERR) at C:\projects\employees\.meteor\local\build\programs\server\app\app.js:57:1
W20160625-21:00:28.747(1)? (STDERR) at C:\projects\employees\.meteor\local\build\programs\server\boot.js:297:10
W20160625-21:00:28.756(1)? (STDERR) at Array.forEach (native)
=> Exited with code: 8
如果我尝试使用此命令安装lodash,我会收到以下错误:meteor npm install --save loadash
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Users\\XPS\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.3.4_1\\mt-os.windows.x86_32\\dev_bundle\\bin\\\\node.exe" "C:\\Users\\XPS\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.3.4_1\\mt-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "loadash"
npm ERR! node v0.10.45
npm ERR! npm v3.9.6
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/loadash
npm ERR! 404
npm ERR! 404 'loadash' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! C:\projects\employees\npm-debug.log
我在此链接上尝试了所有内容:Can't install any package with node npm
问题仍然存在。请帮忙。
答案 0 :(得分:1)
您似乎有拼写错误。您要安装lodash
,而不是loadash
。在您的main.js
文件中查找拼写错误并进行修复。