Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ts-node as optional peer dependency #3609

Open
3 tasks done
rtritto opened this issue May 29, 2024 · 0 comments
Open
3 tasks done

Missing ts-node as optional peer dependency #3609

rtritto opened this issue May 29, 2024 · 0 comments
Assignees
Labels

Comments

@rtritto
Copy link

rtritto commented May 29, 2024

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • 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.4.0

Electron version

30.0.8

Operating system

Windows 11

Last known working Electron Forge version

No response

Expected behavior

No error

Actual behavior

✔ Checking your system
✔ Locating application                                                                                                                                                           
✖ Loading configuration                                                                                                                                                          
  › Unable to use specified module loaders for ".ts".                                                                                                                            
◼ Preparing native dependencies                                                                                                                                                  
◼ Running generateAssets hook                                                                                                                                                    

An unhandled rejection has occurred inside Forge:
Error: Unable to use specified module loaders for ".ts".
at exports.prepare (C:\workspace\AppData\Local\Yarn\Berry\cache\rechoir-npm-0.8.0-fb660b3bc8-10c0.zip\node_modules\rechoir\index.js:58:11)
    at exports.default (C:\workspace\AppData\Local\Yarn\Berry\cache\@electron-forge-core-npm-7.4.0-4c33fc0cff-10c0.zip\node_modules\@electron-forge\core\dist\util\forge-config.js:123:25)
    at async C:\workspace\AppData\Local\Yarn\Berry\cache\@electron-forge-core-npm-7.4.0-4c33fc0cff-10c0.zip\node_modules\@electron-forge\core\dist\api\start.js:44:35       
    at async _Task.taskFn (C:\workspace\AppData\Local\Yarn\Berry\cache\@electron-forge-tracer-npm-7.4.0-9f71f99d40-10c0.zip\node_modules\@electron-forge\tracer\dist\index.js:58:20)
    at async _Task.run (C:\workspace\AppData\Local\Yarn\Berry\cache\listr2-npm-7.0.2-42ddc71dba-10c0.zip\node_modules\listr2\dist\index.cjs:2063:11)

Steps to reproduce

  • yarn init -y
  • yarn set version berry
  • yarn add -D @electron-forge/cli @electron-forge/plugin-vite electron typescript vite
  • Create an empty forge.config.ts file
  • yarn electron-forge start

Additional information

If ts-node is installed as dev dependency, the error disappear.
ts-node should be added in package.json (in electron-forge/* and, if it's a transitive peer dependency, in electron) as an optional peer dependency.

Related issue #3499

@erickzhao erickzhao added the bug label Jul 14, 2024
@erickzhao erickzhao self-assigned this Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants