【发布时间】:2014-06-12 21:32:30
【问题描述】:
我正在尝试使用“scrypt”模块。问题是当我尝试运行我的 nodejs 应用程序(node app.js)时,我收到了这个错误:
C:\Users\A\Documents\B\C>node app.js
module.js:356
Module._extensions[extension](this, filename);
^
Error: The specified module could not be found.
C:\Users\A\Documents\B\C\node_modules\scrypt\build\Release\scry
pt.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Users\A\Documents\B\C\node_module
s\scrypt\index.js:1:76)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
我用这一行安装了 'scrypt' 模块:
npm install scrypt -msvs_version=2012
-msvs_version 采用from this answer
【问题讨论】:
-
听起来它没有编译(正确)。您是否尝试在 Windows SDK 命令提示符下安装?
-
@mscdex “在 Windows SDK 下安装”是什么意思?安装什么?能否请您详细说明。
-
如果您使用的是 Visual Studio Express (2012),您应该已经安装了 Windows SDK。当您安装 SDK 时,它带有自己的命令提示符(在您的开始菜单中),它预先设置了一些用于编译的环境变量。 node-gyp/npm 需要在这个命令提示符下运行,编译才能正常工作。
-
另外,你有什么节点版本(
node -v)? -
节点版本:v0.10.26