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

SSR hides a real error message #1028

Closed
vfilatov opened this issue Apr 14, 2021 · 1 comment · Fixed by #1021
Closed

SSR hides a real error message #1028

vfilatov opened this issue Apr 14, 2021 · 1 comment · Fixed by #1021

Comments

@vfilatov
Copy link

vfilatov commented Apr 14, 2021

SvelteKit v1.0.0-next.74

Describe the bug
SSR doesn't show a real error, which is in my case "ReferenceError: fetch is not defined"
instead of that I get error from ".svelte/dev/components/error.svelte:15:41"

Logs

TypeError: Cannot read property 'message' of undefined
    at eval (/tmp/tmp/.svelte/dev/components/error.svelte:15:41)
    at Object.$$render (/tmp/tmp/node_modules/svelte/internal/index.js:1369:22)
    at Object.default (//tmp/tmp/.svelte/dev/generated/root.svelte:57:127)
    at eval (/tmp/tmp/src/routes/$layout.svelte:11:41)
    at Object.$$render (/tmp/tmp/node_modules/svelte/internal/index.js:1369:22)
    at eval (//tmp/tmp/.svelte/dev/generated/root.svelte:55:122)
    at $$render (/tmp/tmp/node_modules/svelte/internal/index.js:1369:22)
    at Object.render (/tmp/tmp/node_modules/svelte/internal/index.js:1377:26)
    at render_response (file:///tmp/tmp/node_modules/@sveltejs/kit/dist/ssr.js:377:28)
    at async respond_with_error (file:///tmp/tmp/node_modules/@sveltejs/kit/dist/ssr.js:2572:10)

To Reproduce

npm init svelte@next
npm install
cat <<EOF > src/routes/f.svelte
<script>
  fetch('/');
</script>
<div>Ok</div>
EOF
npm run dev

in browser navigate to http://localhost:3000/f

@benmccann benmccann linked a pull request Apr 14, 2021 that will close this issue
@Conduitry
Copy link
Member

Duplicate of #996, and should get fixed by #1021.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants