Closed dreamOf closed 2 months ago
I am not 100% sure what you are trying to do here but a few points to consider
edge
is no longer supported you need to use edge-js
electron-edge-js
should not be included in Electron Forge rebuild script since it is already pre-compiled edge-js
then it needs to rebuild however it requires Visual Studio build tools with MSVC compilers and other build tools
n 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\gypinit.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)