-
-
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
Cannot read property 'split' of undefined - Netlify adapter #1911
Comments
Hello, I am facing the same issue, I tried deploying my Sveltekit app on netlify, on visiting the app, Here's the netlify function logs:
The build succeeds and the website gets deployed but shows the above error, when testing locally using npm run build / npm run preview, the site works as intended, but shows the above error when deployed. using svelte netlify adapter. https://www.npmjs.com/package/@sveltejs/adapter-netlify node: v14.17.2
netlify.toml file:
|
By looking at the stacktraces it looks like the |
@JeanJPNM but this only occurs on the deployed version and not when running/hosting locally. |
Can you show me the request data (headers, uri, etc)? |
Ok, so the whole website doesn't work |
Not only the main page responds with a 500 status, all the requests do |
yes, none of the routes work on the deployed but if you clone the repo and run it locally, everything runs perfectly |
@Bradley-H , @0xPiyush I'm getting the same issue as well (with Node v16.5.0). Have you both considered additionally posting the issue on one of Netlify's Github Issue trackers? |
@seenickcode I created a post in the netlify support forum and they said that they've seen numerous issues on this forum with Sveltekit, though this is the first of this nature, and asked me to add to this issue. I haven't created an issue on Netlify's issue trackers yet. |
Don't post on Netlify's Github. This is our issue
|
I just moved that line of code: #1916 Can y'all try @sveltejs/kit@1.0.0-next.131 and see if it works any better? |
Thank you @benmccann #1916 fixed this issue. |
I’m getting this error as well. I did some sleuthing by publishing previous deploys until the problem went away and then comparing |
Are you using the most recent version of |
kit: 131 I just read Ben’s comment saying to try 131 with the latest adapter…I’ll try that next… |
yes! I updated to the latest of both kit and the netlify adaptor and the problem has indeed gone away for me...thank you @benmccann XD |
Running into this issue again with kit: 286 and netlify-adapter: 47. The build compiles and previews fine locally, but on Netlify results in the cannot read property 'split' of undefined error despite no errors getting thrown in the deployment. Any thoughts? |
Describe the bug
When I upload my project I keep getting cannot read property of "split".
I suspect this has something to do with the adapter and not of Svelte itself since I can run a dev server just fine.
For whatever it might be worth, here is my project in question - https://github.com/Bradley-H/portfolio
Reproduction
upload to netlify
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
here is my website on netlify if you need it - https://bradley-portfolio.netlify.app/
The text was updated successfully, but these errors were encountered: