tjanczuk / edge

Run .NET and Node.js code in-process on Windows, MacOS, and Linux
http://tjanczuk.github.io/edge
Other
5.41k stars 642 forks source link

Error in using Electron Forge packaging in Electron application. #736

Closed dreamOf closed 3 weeks ago

dreamOf commented 3 weeks ago

In the Electron application, using "npm run start "results in an error message as follows(package.json: "start": "electron-forge start"): E:\test\my-new-app>npm run start

my-new-app@1.0.0 start electron-forge start

√ Checking your system √ Locating application √ Loading configuration × Preparing native dependencies: 0 / 1 › node-gyp failed to rebuild 'E:\test\my-new-app\node_modules\edge' ■ Running generateAssets hook

› Traceback (most recent call last): File "E:\test\my-new-app\node_modules\@electron\rebuild\node_modules\node-gyp\gyp\gyp_main.py", line 42, in import gyp # noqa: E402 ^^^^^^^^^^ File "E:\test\my-new-app\node_modules\@electron\rebuild\node_modules\node-gyp\gyp\pylib\gyp__init__.py", line 9, in import gyp.input File "E:\test\my-new-app\node_modules\@electron\rebuild\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in from distutils.version import StrictVersion ModuleNotFoundError: No module named 'distutils' Error: gyp failed with exit code: 1 at ChildProcess.onCpExit (E:\test\my-new-app\node_modules\@electron\rebuild\node_modules\node-gyp\lib\configure.js:325:16) at ChildProcess.emit (node:events:519:28) at ChildProcess._handle.onexit (node:internal/child_process:294:12)

The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

An unhandled rejection has occurred inside Forge: Error: node-gyp failed to rebuild 'E:\test\my-new-app\node_modules\edge' at ChildProcess. (E:\test\my-new-app\node_modules\@electron\rebuild\lib\module-type\node-gyp\node-gyp.js:118:24) at ChildProcess.emit (node:events:519:28) at ChildProcess._handle.onexit (node:internal/child_process:294:12)

agracio commented 3 weeks ago

https://github.com/agracio/edge-js/issues/213