Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

electron 环境下 canvas 安装错误

现象

安装依赖 canvas 后,使用 electron-builder 的命令 install-app-deps 会出现

    node-pre-gyp info using [email protected]
    node-pre-gyp info using [email protected] | win32 | x64
    node-pre-gyp WARN Using request for node-pre-gyp https download
    node-pre-gyp http GET https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-electron-v10.1-win32-unknown-x64.tar.gz
    node-pre-gyp http 404 https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-electron-v10.1-win32-unknown-x64.tar.gz
    node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-electron-v10.1-win32-unknown-x64.tar.gz
    node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (electron-v10.1 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.6.1/canvas-v2.6.1-electron-v10.1-win32-unknown-x64.tar.gz

复现步骤

  1. 初始化项目
  2. 安装依赖 yarn add canvas
  3. 运行 yarn install-app-deps
可复现 GitHub 仓库

相关问题


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...