Open pengrun opened 1 month ago
you are on arm64 and you are compiling canvas node module. Can you compile it outside this build process?
https://github.com/Automattic/node-canvas
Try to compile version 2.11.2 ( latest release ) outside this electron process first and see if you can succeed.
you are on arm64 and you are compiling canvas node module. Can you compile it outside this build process?
https://github.com/Automattic/node-canvas
Try to compile version 2.11.2 ( latest release ) outside this electron process first and see if you can succeed.
First of all, thank you for your reply.
I have already used the latest version of node canvas. When adding fabric.js
,electron force
always fails to build. However, if I remove fabric.js
and add other canvas dependencies (such as@cyntler/react-doc-viewer
)
electron force
can be built normally. At the same time, I replaced the previous only Fabric. js dependency with @cyntler/react-doc-viewer": "^1.17.0
. After that, electron
can be built.
By querying yarn. lock, I found that@cyntler/react-doc-viewer": "^1.17.0
refers topdfjs-dist@4.4.168
The corresponding node in optionalDependencies is 2.11.2.
当然,我期间都执行了以下命令:
rm -rf node_modules/
yarn.lock
yarn install
CheckList
Version
6.0.2
In What environments are you experiencing the problem?
Chrome
Node Version (if applicable)
20.15.0
Link To Reproduction
https://codesandbox.io/p/devbox/fabric-node-sandbox-forked-xewlhg
Steps To Reproduce
Expected Behavior
The project should compile and serve without errors.
Actual Behavior
It has been bothering me for a long time, and in the end, I chose to remove the remaining dependencies to locate the problem. When using other dependencies without fabric, make can succeed, but when using fabric, it does not succeed. The packagejson is as follows:
The execution code is as follows:
Error Message & Stack Trace