Skip to content
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

Failed to install by yarn add canvas #1366

Closed
cheese-git opened this issue Feb 1, 2019 · 3 comments
Closed

Failed to install by yarn add canvas #1366

cheese-git opened this issue Feb 1, 2019 · 3 comments

Comments

@cheese-git
Copy link

After yarn add canvas:

yarn add v1.13.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @nestjs/passport@5.1.0" has unmet peer dependency "passport@^0.4.0".
[4/4] Building fresh packages...
[1/3] ⠄ @nestjs/core
[-/3] ⡀ waiting...
error D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\canvas: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\canvas
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.11.0
node-pre-gyp info using node@10.15.0 | win32 | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\canvas\build\Release\canvas.node" (not found)
node-pre-gyp http GET https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.3.1/canvas-v2.3.1-node-v64-win32-unknown-x64.tar.gz
node-pre-gyp http 404 https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.3.1/canvas-v2.3.1-node-v64-win32-unknown-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.3.1/canvas-v2.3.1-node-v64-win32-unknown-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for canvas@2.3.1 and node@10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.3.1/canvas-v2.3.1-node-v64-win32-unknown-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.0 | win32 | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.0 | win32 | x64
gyp http GET https://nodejs.org/download/release/v10.15.0/node-v10.15.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v10.15.0/node-v10.15.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v10.15.0/SHASUMS256.txt
gyp http GET https://nodejs.org/download/release/v10.15.0/win-x64/node.lib
gyp http GET https://nodejs.org/download/release/v10.15.0/win-x86/node.lib
gyp http 200 https://nodejs.org/download/release/v10.15.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v10.15.0/win-x64/node.lib
gyp http 200 https://nodejs.org/download/release/v10.15.0/win-x86/node.lib
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'D:\\Users\\cheese\\Desktop\\guluneko\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Users\\cheese\\Desktop\\guluneko\\packages\\jnx-cbc-ofl-server\\node_modules\\canvas\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Users\\cheese\\Desktop\\guluneko\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\cheese\\.node-gyp\\10.15.0\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\cheese\\.node-gyp\\10.15.0',
gyp info spawn args   '-Dnode_gyp_dir=D:\\Users\\cheese\\Desktop\\guluneko\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\cheese\\.node-gyp\\10.15.0\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=D:\\Users\\cheese\\Desktop\\guluneko\\packages\\jnx-cbc-ofl-server\\node_modules\\canvas',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'D:\\Users\\cheese\\Desktop\\guluneko\\packages\\jnx-cbc-ofl-server\\node_modules\\canvas\\build',
gyp info spawn args   '-Goutput_dir=.' ]
Warning: Missing input files:
C:\GTK\bin\libpangoft2-1.0-0.dll
C:\GTK\bin\zlib1.dll
C:\GTK\bin\libintl-8.dll
C:\GTK\bin\libgmodule-2.0-0.dll
C:\GTK\bin\libglib-2.0-0.dll
C:\GTK\bin\libexpat-1.dll
C:\GTK\bin\libpng14-14.dll
C:\GTK\bin\libcairo-2.dll
C:\GTK\bin\libfontconfig-1.dll
C:\GTK\bin\libgobject-2.0-0.dll
C:\GTK\bin\libgthread-2.0-0.dll
C:\GTK\bin\libpangocairo-1.0-0.dll
C:\GTK\bin\libfreetype-6.dll
C:\GTK\bin\libpango-1.0-0.dll
C:\GTK\bin\libpangowin32-1.0-0.dll
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.0 | win32 | x64
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
�ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء�
MSBUILD : error MSB3428: δ�ܼ��� Visual C++ �����VCBuild.exe����Ҫ��������⣬1) ��װ .NET Framework 2.0 SDK��2) ��װ Microsoft Visual Studio 2005���� 3) ������������װ��������λ�ã��뽫��λ�����ӵ�ϵͳ·���С� [D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-
server\node_modules\canvas\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Users\cheese\Desktop\guluneko\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "d:\\Program Files\\nodejs\\node.exe" "D:\\Users\\cheese\\Desktop\\guluneko\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=D:\\Users\\cheese\\Desktop\\guluneko\\packages\\jnx-cbc-ofl-server\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=D:\\Users\\cheese\\Desktop\\guluneko\\packages\\jnx-cbc-ofl-server\\node_modules\\canvas\\build\\Release" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\canvas
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'd:\Program Files\nodejs\node.exe D:\Users\cheese\Desktop\guluneko\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\canvas\build\Release --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "d:\\Program Files\\nodejs\\node.exe" "D:\\Users\\cheese\\Desktop\\guluneko\\packages\\jnx-cbc-ofl-server\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\canvas
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'd:\Program Files\nodejs\node.exe D:\Users\cheese\Desktop\guluneko\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\Users\cheese\Desktop\guluneko\packages\jnx-cbc-ofl-server\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=D:\Users\cheese\Desk

Your Environment

Window 10, x64
node v10.15.0
yarn 1.13.0

Thanks a lot!

@zbjornson
Copy link
Collaborator

See #1351 -- prebuilds are currently broken for Windows for v2.3.0 and later. The most recent working version for Windows is v2.2.0. Can you use that version for now?

@cheese-git
Copy link
Author

v2.2.0 works. Thanks again!

@LarryKarani
Copy link

I get a similar error when running yarn install on a project I cloned from github

Screenshot 2019-06-11 at 07 48 44

MacOs v10.14.2
Node v12.4.0
yarn v1.16.0

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants