Тестовой проект. Все взято с сайта.
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225785
npm ERR! first@1.0.0 start: `electron`
npm ERR! Exit status 3221225785
npm ERR!
npm ERR! Failed at the first@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
D:\Electron\first>npm -v
6.14.4
D:\Electron\first>node -v
v13.14.0
main.js
const path = require('path');
const url = require('url');
const {app, BrowserWindow} = require('electron');
let win;
function createWindow()
{
win = new BroserWindow(
{
width: 700,
height: 500,
icon: __dirname + "/img/icon.png"
});
win.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol" 'file:',
slashes: true
}));
win.webContents.openDevTools();
win.on('closed', () =>{
win = null;
});
}
app.on('ready', createWindow);
app.on('window-all-closed', () =>{
app.quit();
});
windows 7
P.S.
все решил проблему electron 22.0.0