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

App crashing at the very beginning. #32

Closed
legildas opened this issue Nov 23, 2022 · 3 comments · Fixed by #33
Closed

App crashing at the very beginning. #32

legildas opened this issue Nov 23, 2022 · 3 comments · Fixed by #33
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@legildas
Copy link

legildas commented Nov 23, 2022

Describe the bug
The app crashes when I start it.

To Reproduce
Steps to reproduce the behavior:

  1. npx create-nodejs-ts-app back
  2. cd back
  3. yarn dev
  4. See error (screenshot)

Expected behavior
The app should work as expected.

Screenshots
Capture d’écran 2022-11-23 à 17 10 34

Desktop :

  • OS: MacOS Monterey (12.3)

Additional context
This is the same behaviour with yarn start. I also tried to yarn compile first but it didn't change anything.

Thanks for your help !

@saisilinus
Copy link
Owner

Hey, you are getting the error because you are using Node.js v19.0.1. To enable imports without file extensions, e.g. import app from './app', I used the flag --es-module-specifier-resolution=node when running the app. However, this has been deprecated in the release of Node.js v19 in favor of custom loaders. You can check out the PR here.

I would like to support the previous Node.js versions as well as v19 and will work on this soon. I will appreciate any help on the issue.

I advise you to use a different version of Node.js for now - Node.js 14 to 18 should be okay

@saisilinus saisilinus added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Nov 23, 2022
@legildas
Copy link
Author

legildas commented Nov 23, 2022

Indeed ! It's now working with the LTS version of Node.js (18.12.1). Thanks a lot !

@saisilinus
Copy link
Owner

Sure 😉

saisilinus added a commit that referenced this issue Nov 26, 2022
Add range for Node.js version to prevent users from using Node.js v19 with the app. This is because
some features of this app are not supported in Node v19

close #32
@saisilinus saisilinus linked a pull request Nov 26, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants