Node.js/Node-pre-gyp:修订间差异
来自康健生活
< Node.js
创建页面,内容为“== 安装 == {{shc|<syntaxhighlight lang="bash"> npm install -g node-gyp</syntaxhighlight>|$|/home/kangkk}} 在安装 canvas-editor 时遇到异常 {{Shc_out|<syntaxhighlight lang="bash">yarn add @hufe921/canvas-editor Insert comment here </syntaxhighlight>|<syntaxhighlight lang="bash">... Command: node-pre-gyp install --fallback-to-build --update-binary Arguments: Directory: C:\\kwy\\GITEA\\athena-frontend\\node_modules\\canvas Output: ... </syntaxhighlight>…” |
|||
| 第21行: | 第21行: | ||
之后再安装就可以了。 | 之后再安装就可以了。 | ||
但这不是好的解题思路。正确的方法应该是从源码开始构建它。参考 https://github.com/Automattic/node-canvas/wiki/Installation%3A-Windows。 | |||
2024年9月6日 (五) 15:49的最新版本
安装
/home/kangkk
npm install -g node-gyp
在安装 canvas-editor 时遇到异常
[jian@kang /home/kangkk]$
yarn add @hufe921/canvas-editor
Insert comment here
...
Command: node-pre-gyp install --fallback-to-build --update-binary
Arguments:
Directory: C:\\kwy\\GITEA\\athena-frontend\\node_modules\\canvas
Output:
...
查找一些攻略后无果,后发现一个解决办法
/home/kangkk
yarn add canvas --canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas
之后再安装就可以了。
但这不是好的解题思路。正确的方法应该是从源码开始构建它。参考 https://github.com/Automattic/node-canvas/wiki/Installation%3A-Windows。
No categories