Deploy Netlify Runtime.UserCodeSyntaxError
See original GitHub issueDescribe the bug
One of these two packages is breaking the code to deploy. (@sveltejs/adapter-netlify @sveltejs/kit) I tried removing the yarn.lock and manually updating my packages without touching those two (@sveltejs/adapter-netlify @sveltejs/kit), when testing it locally it works fine even without updating the packages manually. But when deploying it throws Runtime.UserCodeSyntaxError here the link: https://61e9b8ec568f6c00089b81f5--stoic-perlman-4561ab.netlify.app/. I replaced the yarn.lock with another one from a 9 days old project which worked fine, my conclusion is that something is breaking the code with these two packages (@sveltejs/adapter-netlify @sveltejs/kit). Comparison of both yarn.lock here link: https://github.com/gwet-stripe/test-sveltekit/commits/main/yarn.lock
Reproduction
The error is related to deploy with netlify
Logs
functional:
https://github.com/gwet-stripe/test-sveltekit/commit/911fd8ff0d333deb533f5357eaae13c8ea750afd#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de
not functional:
https://github.com/gwet-stripe/test-sveltekit/commit/96e999682dafe87040be09a1aea85f01bb4842e6#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de
System Info
System:
OS: Linux 5.10 Kali GNU/Linux Rolling 2021.4
CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Memory: 11.48 GB / 14.97 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 17.4.0 - ~/.nvm/versions/node/v17.4.0/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 8.3.1 - ~/.nvm/versions/node/v17.4.0/bin/npm
Browsers:
Chrome: 97.0.4692.71
Firefox: 78.7.0esr
npmPackages:
svelte: ^3.46.2 => 3.46.2
Severity
blocking all usage of svelte
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Ok, I managed to fix the bug! Add this in your
netlify.toml
:I believe this is no longer occurring. If that’s wrong and you provide an updated project using the latest sveltekit and adapter-netlify then I can take a look.