[英]“The specified module could not be found” when building a canvas with node-gyp
I would like to install the https://github.com/LearnBoost/node-canvas/ module. 我想安装https://github.com/LearnBoost/node-canvas/模块。 I followed the windows installation instruction here
我按照Windows安装说明进行操作
https://github.com/LearnBoost/node-canvas/wiki/Installation---Windows . https://github.com/LearnBoost/node-canvas/wiki/Installation---Windows 。
After typing: npm install canvas
I got the following log: 输入后:
npm install canvas
我得到了以下日志:
Creating library F:\Stittch2\node_modules\canvas\build\Release\canvas.lib
and object F:\Stittch2\node_modules\canvas\build\Release\canvas.exp
Generating code
Finished generating code
canvas.vcxproj -> F:\Stittch2\node_modules\canvas\build\Release\\canvas.node
canvas@1.1.3 node_modules\canvas
└── nan@0.4.4
So I thought its compiled successfully, but when I do require('canvas')
in node
I'm getting the following error: 所以我认为它编译成功,但是当我在
node
require('canvas')
,我收到以下错误:
>node
>require('canvas')
Error: The specified module could not be found.
F:\Stittch2\node_modules\canvas\build\Release\canvas.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> (F:\Stittch2\node_modules\canvas\lib\bindings.js:2:18)
with 32bit Node/npm. 32位节点/ npm。
Seems that I'm not getting this error only with this module. 似乎我只是在这个模块中没有收到此错误。
does this fix solves your issue? 这个修复解决了你的问题吗?
https://github.com/nodejs/node/pull/4215 https://github.com/nodejs/node/pull/4215
I think this has been fixed and Node.js 5.3.0 was released with it. 我认为这已得到修复,Node.js 5.3.0随之发布。
https://github.com/nodejs/node/pull/4281 https://github.com/nodejs/node/pull/4281
Hope this helps! 希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.