You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the code of conduct that this project uses.
I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
7.6.0
Electron version
33.2.1
Operating system
macOS Sequoia 15.1
Last known working Electron Forge version
No response
Expected behavior
Able to start the template
Actual behavior
npm run start
fresh@1.0.0 start
electron-forge start
✔ Checking your system
✔ Locating application
✖ Loading configuration
›
1. Must use import to load ES Module: /fresh/forge.config.ts
require() of ES modules is not supported.
require() of /resh/forge.config.ts from
/fresh/node_modules/@electron-forge/core/helper/dynamic-import.js is an ES module file as
it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES
modules.
Instead change the requiring code to use import(), or remove "type": "module" from
/Users/dallas/Documents/Github/electron-test/fresh/package.json.
2. Unknown file extension ".ts" for /fresh/forge.config.ts
◼ Preparing native dependencies
◼ Running generateAssets hook
◼ Running preStart hook
Failed to load: fresh/forge.config.ts
An unhandled rejection has occurred inside Forge:
Error:
Must use import to load ES Module: /fresh/forge.config.ts
require() of ES modules is not supported.
require() of /fresh/forge.config.ts from /fresh/node_modules/@electron-forge/core/helper/dynamic-import.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from /fresh/package.json.
Unknown file extension ".ts" for /fresh/forge.config.ts
Steps to reproduce
Run npm init electron-app@7.4.0 my-new-app -- --template=vite-typescript
Add "type": "module", to package.json
Now run npm start
Additional information
I am investigating a project and the work required to update to ESM. Since electron-store is a native ESM now and using an older version of the store. I was running into some issue with the project when following
Opening this issue since I cannot find a way to use ESM with the Webpack-Typescript template. Just looking for the steps to make the template work before trying on a larger project.
Pre-flight checklist
Electron Forge version
7.6.0
Electron version
33.2.1
Operating system
macOS Sequoia 15.1
Last known working Electron Forge version
No response
Expected behavior
Able to start the template
Actual behavior
npm run start
✔ Checking your system
✔ Locating application
✖ Loading configuration
›
1. Must use import to load ES Module: /fresh/forge.config.ts
require() of ES modules is not supported.
require() of /resh/forge.config.ts from
/fresh/node_modules/@electron-forge/core/helper/dynamic-import.js is an ES module file as
it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES
modules.
Instead change the requiring code to use import(), or remove "type": "module" from
/Users/dallas/Documents/Github/electron-test/fresh/package.json.
2. Unknown file extension ".ts" for /fresh/forge.config.ts
◼ Preparing native dependencies
◼ Running generateAssets hook
◼ Running preStart hook
Failed to load: fresh/forge.config.ts
An unhandled rejection has occurred inside Forge:
Error:
Must use import to load ES Module: /fresh/forge.config.ts
require() of ES modules is not supported.
require() of /fresh/forge.config.ts from /fresh/node_modules/@electron-forge/core/helper/dynamic-import.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from /fresh/package.json.
Unknown file extension ".ts" for /fresh/forge.config.ts
Steps to reproduce
Run npm init electron-app@7.4.0 my-new-app -- --template=vite-typescript
Add "type": "module", to package.json
Now run
npm start
Additional information
I am investigating a project and the work required to update to ESM. Since electron-store is a native ESM now and using an older version of the store. I was running into some issue with the project when following
https://www.electronjs.org/docs/latest/tutorial/esm
https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
I tried implementing the various suggestions seen in
#3671
#3684
The text was updated successfully, but these errors were encountered: