im currently trying to build my Electron Application. For that, i am using Electron Forge. Everything works fine when i run npm start, but when i try to build it with npm run make i get the following error lines:
An unhandled rejection has occurred inside Forge:
[Error: ENOENT: no such file or directory, rename 'C:\Users\RENERE~1\AppData\Local\Temp\electron-packager\win32-x64\yt-downloader-win32-x64\electron.exe' -> 'C:\Users\RENERE~1\AppData\Local\Temp\electron-packager\win32-x64\yt-downloader-win32-x64\yt-downloader.exe'] {
errno: -4058,
code: 'ENOENT',
syscall: 'rename',
path: 'C:\\Users\\RENERE~1\\AppData\\Local\\Temp\\electron-packager\\win32-x64\\yt-downloader-win32-x64\\electron.exe',
dest: 'C:\\Users\\RENERE~1\\AppData\\Local\\Temp\\electron-packager\\win32-x64\\yt-downloader-win32-x64\\yt-downloader.exe'
}
Here is the package.json file:
{
"name": "yt-downloader",
"productName": "yt-downloader",
"version": "1.0.0",
"description": "Download from Youtube",
"main": "index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
},
"keywords": [],
"author": {
"name": "Remling97",
"email": "[email protected]"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "yt_downloader"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
},
"dependencies": {
"electron-squirrel-startup": "^1.0.0",
"ytdl-core": "^2.0.0",
"ytpl": "^0.1.20"
},
"devDependencies": {
"@electron-forge/cli": "6.0.0-beta.50",
"@electron-forge/maker-deb": "6.0.0-beta.50",
"@electron-forge/maker-rpm": "6.0.0-beta.50",
"@electron-forge/maker-squirrel": "6.0.0-beta.50",
"@electron-forge/maker-zip": "6.0.0-beta.50",
"electron": "8.1.0"
}
}
I couldnt really find an answer online to why this happens. Can anyone help me? I Already tryed reinstalling electron, electron-forge and nodejs nothing worked.