electron-forge start and electron-forge make properly work as they supposed to do.
Following errors occur.
When I try electron-forge start by running npm start I get following error. I set DEBUG option.
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:async-ora Process Started: Checking your system +0ms
electron-forge:check-system checking system, create ~/.skip-forge-system-check to stop doing this +0ms
electron-forge:async-ora Process Succeeded: Checking your system -- after 218ms +219ms
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:async-ora Process Started: Locating Application +0ms
electron-forge:project-resolver searching for project in: C:\Users\frmh0313\Desktop\RA\0207 +0ms
electron-forge:project-resolver electron-forge compatible package.json found in C:\Users\frmh0313\Desktop\RA\0207\package.json +2ms
electron-forge:async-ora Process Succeeded: Locating Application -- after 12ms +13ms
electron-forge:async-ora Process Started: Preparing native dependencies +6ms
electron-forge:async-ora Process Renamed: Preparing native dependencies --> Preparing native dependencies: 0 / 1 +1s
electron-forge:async-ora Process Renamed: Preparing native dependencies: 0 / 1 --> Preparing native dependencies: 1 / 1 +1ms
electron-forge:async-ora Process Succeeded: Preparing native dependencies: 1 / 1 -- after 1.3s +3ms
electron-forge:async-ora Process Started: Launching Application +21ms
electron-forge:async-ora Process Failed: Launching Application -- after 26ms +26ms
An unhandled error has occurred inside Forge:
The "file" argument must be of type string. Received type object
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
at validateString (internal/validators.js:113:11)
at normalizeSpawnArguments (child_process.js:398:3)
at spawn (child_process.js:538:13)
at asyncFn (C:\Users\frmh0313\Desktop\RA\0207\node_modules\@electron-forge\core\src\api\start.ts:109:17)
at C:\Users\frmh0313\Desktop\RA\0207\node_modules\@electron-forge\async-ora\src\ora-handler.ts:35:5
at new Promise (<anonymous>)
at asyncOra (C:\Users\frmh0313\Desktop\RA\0207\node_modules\@electron-forge\async-ora\src\ora-handler.ts:34:10)
at forgeSpawn (C:\Users\frmh0313\Desktop\RA\0207\node_modules\@electron-forge\core\src\api\start.ts:108:11)
at forgeSpawnWrapper (C:\Users\frmh0313\Desktop\RA\0207\node_modules\@electron-forge\core\src\api\start.ts:121:21)
at C:\Users\frmh0313\Desktop\RA\0207\node_modules\@electron-forge\cli\src\electron-forge-start.ts:59:19
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `electron-forge start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\frmh0313\AppData\Roaming\npm-cache\_logs\2020-05-01T04_16_30_080Z-debug.log
And when I try electron-forge make, I get following error message on squirrel. I already checked issues on the errors related to squirrel, but I had no luck.
...
electron-forge:async-ora Process Started: Making for target: squirrel - On platform: win32 - For arch: x64 +2ms
electron-windows-installer:main Created NuSpec file:
electron-windows-installer:main <?xml version="1.0" encoding="utf-8"?>
electron-windows-installer:main <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
electron-windows-installer:main <metadata>
electron-windows-installer:main <id>0207</id>
electron-windows-installer:main <title>0207</title>
electron-windows-installer:main <version>1.0.0</version>
electron-windows-installer:main <authors></authors>
electron-windows-installer:main <owners></owners>
electron-windows-installer:main <iconUrl>https://raw.githubusercontent.com/atom/electron/master/atom/browser/resources/win/atom.ico</iconUrl>
electron-windows-installer:main <requireLicenseAcceptance>false</requireLicenseAcceptance>
electron-windows-installer:main <description></description>
electron-windows-installer:main <copyright>Copyright © 2020 </copyright>
electron-windows-installer:main </metadata>
electron-windows-installer:main <files>
electron-windows-installer:main <file src="locales\**" target="lib\net45\locales" />
electron-windows-installer:main <file src="resources\**" target="lib\net45\resources" />
electron-windows-installer:main <file src="*.bin" target="lib\net45" />
electron-windows-installer:main <file src="*.dll" target="lib\net45" />
electron-windows-installer:main <file src="*.pak" target="lib\net45" />
electron-windows-installer:main <file src="*.exe.config" target="lib\net45" />
electron-windows-installer:main <file src="*.exe.sig" target="lib\net45" />
electron-windows-installer:main <file src="icudtl.dat" target="lib\net45\icudtl.dat" />
electron-windows-installer:main <file src="Squirrel.exe" target="lib\net45\squirrel.exe" />
electron-windows-installer:main <file src="LICENSE" target="lib\net45\LICENSE" />
electron-windows-installer:main <file src="0207.exe" target="lib\net45\0207.exe" />
electron-windows-installer:main </files>
electron-windows-installer:main </package>
electron-windows-installer:main +0ms
electron-windows-installer:spawn Spawning C:\Users\frmh0313\Desktop\RA\0207\node_modules\electron-winstaller\vendor\nuget.exe pack C:\Users\frmh0313\AppData\Local\Temp\si-202041-30232-1k1c105.xb01\0207.nuspec -BasePath C:\Users\frmh0313\Desktop\RA\0207\out\0207-win32-x64 -OutputDirectory C:\Users\frmh0313\AppData\Local\Temp\si-202041-30232-1k1c105.xb01 -NoDefaultExcludes +0ms
electron-forge:async-ora Process Failed: Making for target: squirrel - On platform: win32 - For arch: x64 -- after 262ms +262ms
An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: 1
Output:
Attempting to build package from '0207.nuspec'.
Authors is required.
Description is required.
Error: Failed with exit code: 1
Output:
Attempting to build package from '0207.nuspec'.
Authors is required.
Description is required.
at ChildProcess.<anonymous> (C:\Users\frmh0313\Desktop\RA\0207\node_modules\electron-winstaller\src\spawn-promise.ts:52:16)
at ChildProcess.emit (events.js:210:5)
at ChildProcess.EventEmitter.emit (domain.js:478:20)
at maybeClose (internal/child_process.js:1028:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
I imported my project to use electron-forge.
I tried deleting and reinstalling node_modules several times, which didn't work.
And electron-forge package is working.
And when I try npm run _start below, it properly works.
{
"name": "0207",
"version": "1.0.0",
"description": "",
"main": "./dist/electron.js",
"scripts": {
"start": "electron-forge start",
"_start": "npm run build && electron ./dist/electron.js",
"build": "npm run rebuild && webpack --config ./webpack.config.js",
"rebuild": "electron-rebuild -f -w sqlite3",
"execute": "electron ./dist/electron.js",
"debug": ".",
"package": "electron-forge package",
"make": "electron-forge make"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@electron-forge/cli": "6.0.0-beta.51",
"@electron-forge/maker-deb": "6.0.0-beta.51",
"@electron-forge/maker-rpm": "6.0.0-beta.51",
"@electron-forge/maker-squirrel": "6.0.0-beta.51",
"@electron-forge/maker-zip": "6.0.0-beta.51",
"@types/knex": "^0.16.1",
"@types/node": "^13.13.4",
"@types/prop-types": "^15.7.3",
"@types/qs": "^6.9.1",
"@types/react": "^16.9.19",
"@types/react-dom": "^16.9.5",
"@types/react-redux": "^7.1.7",
"@types/react-router": "^5.1.4",
"@types/react-router-dom": "^5.1.3",
"@types/sequelize": "^4.28.8",
"@types/sqlite3": "^3.1.6",
"concurrently": "^5.1.0",
"crypto": "^1.0.1",
"css-loader": "^3.4.2",
"electron": "^8.2.5",
"electron-devtools-installer": "^2.2.4",
"electron-is-dev": "^1.1.0",
"electron-prebuilt-compile": "8.2.0",
"html-webpack-plugin": "^3.2.0",
"knex": "^0.20.9",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"style-loader": "^1.1.3",
"ts-loader": "^6.2.1",
"typescript": "^3.7.5",
"typings-for-css-modules-loader": "^1.7.0",
"wait-on": "^4.0.0",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
},
"dependencies": {
"@ag-grid-community/all-modules": "^22.1.1",
"@ant-design/icons": "^4.1.0",
"ag-grid-community": "^23.0.2",
"ag-grid-react": "^23.0.3",
"antd": "^4.1.5",
"async-csv": "^2.1.3",
"axios": "^0.19.2",
"csv-parser": "^2.3.2",
"csv-writer": "^1.6.0",
"electron-better-ipc": "^1.0.0",
"electron-promise-ipc": "^2.1.0",
"electron-rebuild": "^1.10.0",
"electron-squirrel-startup": "^1.0.0",
"electron-window-manager": "^1.0.6",
"node-abi": "^2.16.0",
"prop-types": "^15.7.2",
"qs": "^6.9.3",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-actions": "^2.6.5",
"redux-devtools-extension": "^2.13.8",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"redux-undo": "^1.0.1",
"sqlite3": "^4.1.1",
"string-similarity": "^4.0.1",
"typesafe-actions": "^5.1.0",
"xlsx": "^0.15.5"
},
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "0207"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
}
}
Thank you in advance.
To help triage have you tried with version 6.0.0-beta.50?
Thanks for the comment! I'm trying to do with version 6.0.0-beta.50. But could you tell me how to import existing project with specific version of electron-forge? I'm googling but I haven't found how to do it.
I'm not sure what you mean how to import. Do you mean you're not sure how to change the version? If that's the case you can change it in package.json and then update the version numbers to be the version you want and remove the ^ in front of the version.
Sorry if you knew already I'm just unsure what you meant
Oh, I tried to follow the same process I followed first time. I already had a project and imported it to electron-forge, using npx @electron-forge/cli import. I just deleted node_modules, changed the version in package.json, reinstalled node modules, and tried the commands, which is giving me the same results.
Regarding the start error - in order to debug your problem further, we need a minimal testcase to reproduce your problem. Using electron-forge init as a base, could you please create a minimal Electron app that illustrates the issue you described, and post a link to it here?
Regarding the make error - your description and author are both blank, which Squirrel.Windows does not like. From your output:
Output:
Attempting to build package from '0207.nuspec'.
Authors is required.
Description is required.
@malept Sorry for late reply. And thanks for letting me know. But I switched my project to use electron-builder instead and it's now working well without any problem. Adding the description and author might have solved the problem I experienced at the time. Let me close the issue. Thank you.
In your package.json file, you just have to fill the Author and Description properties which are currently empty :-)
Most helpful comment
In your package.json file, you just have to fill the Author and Description properties which are currently empty :-)