-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
default project template doesn't work with Node v18 #1773
Comments
Edit: This was a large break in the ecosystem on Node's side, but you can work around this by setting {
"scripts": {
"dev": "NODE_OPTIONS=--openssl-legacy-provider preact watch"
}
}
While we're working on upgrading (as you can see in the issue you linked), it's a lot of work and I'm the only one contributing at the moment. Re:the official guide, we're still debating on what tools we'd like to point to. You might be happier with Vite, Astro, or Fresh. |
Thanks for the quick reply and providing a solution. Regarding the official guide, I think it's very important to have "getting started" instructions that work. By now I assume that most people are on Node v18.x and their first experience with preact will be that the default app template created in the official tutorial raises a strange configuration error. I'd expect that this really harms adoption. Personally I have a slight preference for Vite. But that really doesn't matter as long as the code runs. |
Actually, 18 has very few (comparative) users; most people tend to only upgrade when necessary. I still see a fair number of 10 & 12 users on some projects I maintain. But indeed, this isn't ideal. I'll try to think up a solution after work but it's a tad finicky as setting that env var can cause issues in a lot of systems, so we don't really want to do it ourselves. As for the "Getting Started" instructions, I've tried. Can't do much more myself at this point. Thanks for the feedback and bearing with me. |
Created #1774 for this. |
What is the current behaviour?
The default project doesn't work with Node v18.
Steps to Reproduce
I'm following the preactjs getting started guide:
This code doesn't run. It results in the error message:
What is the expected behaviour?
It should be possible to use preactjs with an up-to-date version of Node, particularly when following the official tutorial.
Please mention any other relevant information
I think this issue is related: #1579
Please paste the results of
npx preact-cli info
here.The text was updated successfully, but these errors were encountered: