Electron's Typescript+Webpack Template Cannot Run

Asked 3 months ago, Updated 3 months ago, 358 views

Followed the ElectronForge page and installed the Electron template using the following command:

npx create-electron-app my-new-app --template=typescript-webpack

Next is

npm run start

When you run , an error message similar to the following appears in the command window:

$npm run start

>[email protected] start
>electron-forge start

✔ Checking your system
✔Locating Application

Unhandled rejection has occurred inside Forge:
Error: Expected plugin to either be a plugin instance or a {name, config} object but found @electron-force/plugin-webpack, [object Object]

Electron Forge was terminated.Location:
{}

I tried googling, but no one had the same error problem.Another project I made a week ago was working without any error messages, so I copied it and ran it, and it worked normally.
However, if you run the following command,

npm audit

22 varnerabilities (3 moderate, 19 high) came out.
The error is

got<11.8.5 
Severity: moderate

and

minimatch<3.0.5
Severity: high

The npm audit fix or npm audit fix --force did not fix it.Therefore, we corrected this error by rewriting package.json and package-lock.json.Then delete the node_modules folder and perform npm install.
However,

`npm run start` 

The first error occurred again when running .

There may be a problem with the electron-forge/plugin-webpack, but I've just started studying this field and I'm not sure if it's a plug-in configuration.

I would appreciate it if you could let me know.

nodejs typescript webpack electron

2022-10-28 10:15

1 Answers

I think it's the next issue (it seems to be a bug caused by a recent change):

As stated,

The fix has not been published yet, we're aiming to get that out tomorrow PST

Therefore, I think the correction will be reflected after a while.


2022-10-28 10:15

If you have any answers or tips


© 2023 OneMinuteCode. All rights reserved.