tnfe / FFCreator

A fast video processing library based on node.js (一个基于node.js的高速视频制作库)
http://tnfe.github.io/FFCreator/
MIT License
2.82k stars 399 forks source link

在electron上运行require ffcreator报错 #348

Open wth1107 opened 1 year ago

wth1107 commented 1 year ago

electron 24.1.2 node 18.14.0 ffcreator ^7.0.3 运行在win10系统 App threw an error during load Error: The module '\?\D:\project\electron\ef3\node_modules.store\gl@6.0.2\node_modules\gl\build\Release\webgl.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 108. This version of Node.js requires NODE_MODULE_VERSION 114. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install). at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822) at Module._extensions..node (node:internal/modules/cjs/loader:1326:18) at Object.func [as .node] (node:electron/js2c/asar_bundle:2:1822) at Module.load (node:internal/modules/cjs/loader:1096:32) at Module._load (node:internal/modules/cjs/loader:937:12) at f._load (node:electron/js2c/asar_bundle:2:13330) at Module.require (node:internal/modules/cjs/loader:1120:19) at require (node:internal/modules/cjs/helpers:103:18) at bindings (D:\project\electron\ef3\node_modules.store\bindings@1.5.0\node_modules\bindings\bindings.js:112:48) at Object. (D:\project\electron\ef3\node_modules.store\gl@6.0.2\node_modules\gl\src\javascript\native-gl.js:1:40)

尝试了官方的.\node_modules.bin\electron-rebuild.cmd 但仍未解决问题 ,哪位大佬给点建议!!

drawcall commented 1 year ago

Will provide a full electron demo if I have time

wth1107 commented 1 year ago

@drawcall 期待

vutienhc commented 1 year ago

I got the same error. Please help me. Thank you.

vutienhc commented 1 year ago

@wth1107 Have you found a solution yet?

wth1107 commented 1 year ago

没有啊,我在等待作者的demo

wth1107 commented 1 year ago

@vutienhc @linqian02 好大哥们 有招了吗

wangmode commented 1 year ago

@drawcall electron demo 这个有空搞下吧🙇‍

zjqiudan commented 1 year ago

求demo,等了快1年了....

wth1107 commented 12 months ago

半年了。。。o(╥﹏╥)o

ahnuchen commented 7 months ago

@drawcall 大哥,有招了吗

drawcall commented 2 months ago

先使用这个项目 https://github.com/tnfe/FFCreator/issues/435 ,ffcreator结合electron我后面会更新

2284730142 commented 1 month ago

基本上是因为inkpaint的底层用了headless-gl和node-canvas,这两块如果能用electron自带内容编译的话,就没有问题了,但是问题关键就是这两个东西,node-canvas强制切换到3.0-alpha能够正常编译通过(已经支持了node-addon-api),且能够使用,但是headless,使用较新的electron-rebuild,无法编译通过,因为它只支持nan(详情参考node-canvas和headless-gl的binding.gyp文件配置),这两块配置我不太懂,如果有懂的大佬,可以尝试调整这两个东西,来让编译能够通过,如果测试结果ok,希望能共享这个headless-gl的binding.gyp配置

已存在的提问:https://github.com/stackgl/headless-gl/issues/291

xeoshow commented 5 hours ago

@2284730142 headless-gl和node-canvas确实安装搭建非常麻烦。有个借助于rust的零依赖的canvas,看着API完全一样,也几乎都实现了,性能还要好得多。要是FFCreator项目里的canvas可以用这个平替,估计好很多。那个canvas的开发作者技术也非常非常牛,做了很多影响力和star很多的开源项目,都非常受欢迎。

https://github.com/Brooooooklyn/canvas