【问题标题】:'The specified module could not be found' error when using 'scrypt' module in node.js在 node.js 中使用“scrypt”模块时出现“找不到指定的模块”错误
【发布时间】: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

标签: node.js node-gyp scrypt


【解决方案1】:

你应该看看this node-scrypt issue

根据上面所说的,你应该可以解决你的问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-08-18
    • 2018-08-05
    • 2014-11-28
    • 1970-01-01
    • 2020-03-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-06
    相关资源
    最近更新 更多