在Windows 10中的Nodejs lodash问题

Windows 10 64位

我试图玩这个回购: https : //github.com/mailgun/node-prelaunch

我有Mongodb和node.js一起运行,但似乎无法获得节点服务器运行。

我已经在主目录(C:\ Users \ me \ Desktop \ myproject \ node-prelaunch)中安装了lodash,其中package.js包含依赖关系,但仍然出现这些错误:

C:\Users\me\Desktop\myproject\node-prelaunch>node server module.js:327 throw err; ^ Error: Cannot find module './lodash' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (C:\Users\me\Desktop\myproject\node- prelaunch\node_modules\express- validator\node_modules\lodash\index.js:1:80) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) 

我已经回顾了这个链接,并试图按照步骤会议: 找不到模块“lodash”

最后,我猜我不确定应该在哪里安装lodash的文件位置。 任何帮助是极大的赞赏。

您正在从当前工作目录导入lodash ,而不是本地包索引:

 require('./lodash') Error: Cannot find module './lodash' 

./lodash是一个相对path。 这意味着<current directory>/lodash尝试使用没有前缀的名称:

 require('lodash')