-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Cannot install in v12.16.3 #1580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you try again once or twice please? I hit this a few times last night. It seems like GitHub release assets might be having some service issues. |
Still |
See also #1573 - this is an upstream issue with Node.js/needle (tomas/needle#312) Renamed the issue for better visibility to other users. |
same problem, any work around? thanks |
@zbjornson thanks, I got it, and I write it down here for others that may have the same problem:
|
Hi!, I faced the same issue in Ubuntu 20.04 with latest Node. Thanks! |
@zbjornson Your workaround worked for me. I used nvm instead of n, and that did the trick as well. |
Indead #1580 (comment) worked. |
@RobinSchapendonk why you close this issue?, can I use node 12.16.3 with this library? |
@neumartin To answer your second question: As long as you switch to Node 12.13.1 before you run 'npm install canvas', you can switch back to 12.16.3 afterwards. It's not ideal, but seems to work OK for now. Not sure why the closed it. Obviously this is a temporary workaround and not a fix. I have to use a 12.16.3 environment, so this is my best option. |
fatal error C1083: Cannot open include file: 'jpeglib.h' canvas windows
Issue or Feature
PS D:\data\bots\official\Earl> npm i canvas
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Remote end closed socket abruptly.
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Backend.cc
ImageBackend.cc
PdfBackend.cc
SvgBackend.cc
BMPParser.cc
Backends.cc
Canvas.cc
CanvasGradient.cc
D:\data\bots\official\Earl\node_modules\canvas\src\closure.h(6,10): fatal error C1083: Cannot open include file: 'jpeglib.h': No such file or directory (compiling source file ..\src\backend\SvgBac
kend.cc) [D:\data\bots\official\Earl\node_modules\canvas\build\canvas.vcxproj]
CanvasPattern.cc
D:\data\bots\official\Earl\node_modules\canvas\src\closure.h(6,10): fatal error C1083: Cannot open include file: 'jpeglib.h': No such file or directory (compiling source file ..\src\backend\PdfBac
kend.cc) [D:\data\bots\official\Earl\node_modules\canvas\build\canvas.vcxproj]
CanvasRenderingContext2d.cc
D:\data\bots\official\Earl\node_modules\canvas\src\closure.h(6,10): fatal error C1083: Cannot open include file: 'jpeglib.h': No such file or directory (compiling source file ..\src\Canvas.cc) [D:
\data\bots\official\Earl\node_modules\canvas\build\canvas.vcxproj]
closure.cc
color.cc
D:\data\bots\official\Earl\node_modules\canvas\src\closure.h(6,10): fatal error C1083: Cannot open include file: 'jpeglib.h': No such file or directory (compiling source file ..\src\Backends.cc) [
D:\data\bots\official\Earl\node_modules\canvas\build\canvas.vcxproj]
Image.cc
ImageData.cc
init.cc
register_font.cc
win_delay_load_hook.cc
D:\data\bots\official\Earl\node_modules\canvas\src\closure.h(6,10): fatal error C1083: Cannot open include file: 'jpeglib.h': No such file or directory (compiling source file ..\src\closure.cc) [D
:\data\bots\official\Earl\node_modules\canvas\build\canvas.vcxproj]
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=D:\data\bots\official\Earl\node_modules\canvas\build\Release\canvas.node" "--module_name=canvas" "--module_path=D:\data\bots\official\Earl\node_modules\canvas\build\Release" "--napi_version=5"
"--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd D:\data\bots\official\Earl\node_modules\canvas
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\data\bots\official\Earl\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\data\bots\official\Earl\node_modules\canvas\build\Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\ytrob\AppData\Roaming\npm\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\ytrob\AppData\Roaming\npm\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\data\bots\official\Earl\node_modules\canvas
node-pre-gyp ERR! node -v v12.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\data\bots\official\Earl\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\data\bots\official\Earl\node_modules\canvas\build\Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN [email protected] No description
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install:
node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ytrob\AppData\Roaming\npm-cache_logs\2020-05-13T21_03_55_413Z-debug.log
Steps to Reproduce
npm install canvas
Your Environment
Solved: #1580 (comment)
The text was updated successfully, but these errors were encountered: