🔴🔴[Dúvida] - NÃO CONSIGO GERAR EXECUTÁVEL ELECTRON
Eai pessoal, eu estou tendando empacotar o meu website em .exe usando o electron.
eu estou usando o electron-builder para fazer a empacotação do app.
mas quando eu termino de fazer as configurações e dou um npm run dist
.
ele dâ o seguinte erro:
api-mynager@1.0.0 dist
> electron-builder
• electron-builder version=24.4.0 os=10.0.19045
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• executing @electron/rebuild arch=x64 version=25.2.0 appDir=C:\Users\Matheus\Documents\projectos\desktop my manager
Attempting to build a module with a space in the path
See https://github.com/nodejs/node-gyp/issues/65#issuecomment-368820565 for reasons why this may not work
Error: Could not find any Python installation to use
at PythonFinder.fail (C:\Users\Matheus\Documents\projectos\desktop my manager\node_modules\@electron\rebuild\node_modules\node-gyp\lib\find-python.js:330:47)
at PythonFinder.runChecks (C:\Users\Matheus\Documents\projectos\desktop my manager\node_modules\@electron\rebuild\node_modules\node-gyp\lib\find-python.js:159:21)
at PythonFinder.<anonymous> (C:\Users\Matheus\Documents\projectos\desktop my manager\node_modules\@electron\rebuild\node_modules\node-gyp\lib\find-python.js:228:18)
at PythonFinder.execFileCallback (C:\Users\Matheus\Documents\projectos\desktop my manager\node_modules\@electron\rebuild\node_modules\node-gyp\lib\find-python.js:294:16)
at exithandler (node:child_process:427:5)
at ChildProcess.errorhandler (node:child_process:439:5)
at ChildProcess.emit (node:events:513:28)
at ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
⨯ node-gyp failed to rebuild 'C:\Users\Matheus\Documents\projectos\desktop my manager\node_modules\sqlite3' failedTask=build stackTrace=Error: node-gyp failed to rebuild 'C:\Users\Matheus\Documents\projectos\desktop my manager\node_modules\sqlite3'
at ChildProcess.<anonymous> (C:\Users\Matheus\Documents\projectos\desktop my manager\node_modules\@electron\rebuild\src\module-type\node-gyp\node-gyp.ts:131:16)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Eis a minha configuração do package.json
:
{
"name": "api-mynager",
"version": "1.0.0",
"description": "descrição do mynager",
"main": "main.js",
"author":{
"nome":"Matheus manuel",
"email":"[email protected]"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start:matheus": "nodemon index.js",
"start": "electron .",
"pack":"electron-builder --dir",
"dist":"electron-builder"
},
"keywords": [],
"author": "Matheus manuel",
"license": "ISC",
"dependencies": {
"axios": "^1.4.0",
"ejs": "^3.1.9",
"express": "^4.18.2",
"nodemon": "^2.0.22",
"sqlite": "^4.1.2",
"sqlite3": "^5.1.6"
},
"build":{
"appId":"app.netlify.matheusmanuel",
"mac":{
"icon":"./public/assets/img/logo.png"
},
"win":{
"icon":"./public/assets/img/logo.png"
}
},
"devDependencies": {
"electron": "^25.2.0",
"electron-builder": "^24.4.0"
}
}
Muito obrigado.