Error:Canot find module./build/Release/canvas'
2620 ワード
win 7 node-canvasのインストールにエラーが発生しました.
module.js:328
throw err;
^
Error: Cannot find module '../build/Release/canvas'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (D:\wwwroot\mobile\trunk\src
ode_modules\canvas\lib\b
indings.js:3:18)
at Module._compile (module.js:398:26)
at Module._extensions..js (module.js:405:10)
at Object.require.extensions.(anonymous function) [as .js] (D:\wwwroot\mobil
e\trunk\src
ode_modules\babel-register\lib
ode.js:152:7)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (D:\wwwroot\mobile\trunk\src
ode_modules\canvas\lib\c
anvas.js:13:14)
at Module._compile (module.js:398:26)
at Module._extensions..js (module.js:405:10)
at Object.require.extensions.(anonymous function) [as .js] (D:\wwwroot\mobil
e\trunk\src
ode_modules\babel-register\lib
ode.js:152:7)
解決策:npm rebuild canvas
node-gyp rebuild err: 。 , “/m” 。
Canvas.cc
CanvasGradient.cc
CanvasPattern.cc
CanvasRenderingContext2d.cc
..\src\Canvas.cc(145): warning C4457: declaration of 'data' hides function para
meter [
ode_modules\canvas\build\canvas.vcxproj]
..\src\Canvas.cc(141): note: see declaration of 'data'
color.cc
Image.cc
ImageData.cc
init.cc
win_delay_load_hook.c
C:\Users\sf\AppData\Roaming
pm
ode_modules
pm
ode_modules
ode-gyp\sr
c\win_delay_load_hook.c(28): warning C4055: 'type cast': from data pointer 'HMO
DULE' to function pointer 'FARPROC' [D:\wwwroot\mobile\trunk\src
ode_modules\c
anvas\build\canvas.vcxproj]
C:\Users\sf\AppData\Roaming
pm
ode_modules
pm
ode_modules
ode-gyp\sr
c\win_delay_load_hook.c(31): error C2373: '__pfnDliNotifyHook2': redefinition;
different type modifiers [D:\wwwroot\mobile\trunk\src
ode_modules\canvas\build
\canvas.vcxproj]
D:\Program Files\Microsoft Visual Studio 2015\VC\include\delayimp.h(134): not
e: see declaration of '__pfnDliNotifyHook2'
解決策: "C:\Users\sf\AppData\Roaming
pm
ode_modules
pm
ode_modules
ode-gyp\sr
c\win_delay_load_hook.c" PfnDliHook __pfnDliNotifyHook2 = load_exe_hook;