我正在浏览我的第一个node.js项目.我已经安装了mongodb,有一个server.js文件,当我尝试运行它时,我收到了这个错误
module.js:340
throw err;
^
Error: Cannot find module 'mongodb'
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)
Run Code Online (Sandbox Code Playgroud)
我很确定我安装了mongodb,我是来自C#windows后台的unix新手,但我认为这是一条未正确配置的路径?
当我尝试npm install socket.io在我的Windows 7机器上使用Visual Studio 2012(而不是2010)安装一些node.js软件包(特别是sqlite3和socket.io )时,我遇到了一些看起来像这样的故障:
C:\ Program Files(x86)\ MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(35,5):错误MSB8020:Visual Studio 2010的构建工具(Platform Toolset ='v100 ')无法找到.要使用v100构建工具进行构建,请单击"项目"菜单或右键单击解决方案,然后选择"更新VC++项目...".安装Visual Studio 2010以使用Visual Studio 2010构建工具进行构建.