-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
New Sveltekit project throws unhandled error on Netlify #5445
Comments
5319? Are you sure you got the right one? Also, could you see if setting the |
Apologies, #5337 was the correct issue. Setting Is this something that will be resolved when Netlify begins defaulting to Node 16 on Monday? With the .nvmrc file in my project as detailed above, Netlify was building the project with node v16.16.0, but presumably the lambda runtime is not using that version. |
The changelog entry for 1.0.0-next361 says that it contains a breaking change: Kit now requires Node 16.9 or later. So yes, this will probably auto-resolve when Netlify defaults to Node 16. |
@rmunn If i'm understanding this correctly, I need to just update my nodeRC with node16+ |
FYI, as of today the default Lambda JS runtime on Netlify is |
I just reran the deployment of the example repository without explicitly setting |
Describe the bug
After creating a new Sveltekit project with
npm create svelte my-app
and deploying to Netlify, the site will build successfully, butRuntime.UserCodeSyntaxError - SyntaxError: Unexpected token '??='
will be thrown upon visiting the site.Reproduction
Example repository
Github: https://github.com/Kevinmatthews100/sveltekit-netlify-issue-reproduction
Netlify deployment of above repository: https://quiet-selkie-61acce.netlify.app
Steps to reproduce
Create a new sveltekit project
Choose the following options as prompted
CD to your new project, and add
netlify.toml
to the root of your project with the following contents:To ensure Netlify builds with Node version 16, add
.nvmrc
to the root of your project with the following contents:Optionally, resolve npm dependences and ensure your project can successfully start and build locally
Next, initialize a git repository for the project, create a new Github repository, and push your newly created Sveltekit project.
Deploy the project to netlify
Create a new site on netlify, importing the github repo you created
Upon visiting the deployed site, you should see that an unhandeled error is thrown with the message:
Logs
System Info
Severity
serious, but I can work around it
Additional Information
The same error will occur when configuring the project with the most recent version of
@sveltejs/adapter-netlify
, which is1.0.0-next.67
at the time of writing, and following the installation instructions here.The issue can be worked around by installing and pinning
@sveltejs/adapter-netlify
to1.0.0-next.65
.1.0.0-next.66
causes the same build error detailed in issue #5337.The text was updated successfully, but these errors were encountered: