You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you the <script context="module"> docs in Sapper environment and add lang="typescript" to both <script> elements the page/component will not be rendererd server side. Instead of the page/component render the server will response an 500 error.
To Reproduce
Here is a repo to reproduce. It is a fork of sapper-template-rollup. With only the preprocessor and some simple typescript declarations and lang="typescript" added (see diff). If you go to http://localhost:3000/blog you will get an 500 error. If you go to the blog via navigation link it will render correctly.
Preprocessor to be able to handle typescript in Svelte module context for preload functionality.
Stacktraces
Inside the page/component as server response
500
Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at each (/…/__sapper__/dev/server/server.js:200:31)
at create_ssr_component (/…/__sapper__/dev/server/server.js:305:35)
at Object.$$render (/…/__sapper__/dev/server/server.js:230:22)
at Object.default (/…/__sapper__/dev/server/server.js:548:86)
at create_ssr_component (/…/__sapper__/dev/server/server.js:375:70)
at Object.$$render (/…/__sapper__/dev/server/server.js:230:22)
at create_ssr_component (/…/__sapper__/dev/server/server.js:545:40)
at $$render (/…/__sapper__/dev/server/server.js:230:22)
at Object.render (/…/__sapper__/dev/server/server.js:238:26)
at handle_page (/…/__sapper__/dev/server/server.js:3021:36)
Information about your project:
Your browser and the version: Chromium Version 80.0.3987.122 (Official Build) (64-bit)
Your operating system: OS X 10.13.6
svelte version 3.22.3
sapper version 0.27.13
svelte-preprocess version 3.7.4
Rollup
The text was updated successfully, but these errors were encountered:
I just realized that the Rollup warnings are always pressend as soon as you add a function which returns a Promise. Even without context="module". Could this be related anyhow 🤔. Otherwise the warnings might be another "issue"
Edit: I edited the issue and removed the Rollup part. I changed the tsconfig.json to:
Describe the bug
If you the <script context="module"> docs in
Sapper
environment and addlang="typescript"
to both<script>
elements the page/component will not be rendererd server side. Instead of the page/component render the server will response an 500 error.To Reproduce
Here is a repo to reproduce. It is a fork of sapper-template-rollup. With only the preprocessor and some simple typescript declarations and
lang="typescript"
added (see diff). If you go to http://localhost:3000/blog you will get an 500 error. If you go to the blog via navigation link it will render correctly.https://github.com/dionysiusmarquis/sapper-template-rollup/tree/bug/typescript-context-module
Expected behavior
Preprocessor to be able to handle typescript in
Svelte
module context forpreload
functionality.Stacktraces
Inside the page/component as server response
Information about your project:
svelte
version 3.22.3sapper
version 0.27.13svelte-preprocess
version 3.7.4The text was updated successfully, but these errors were encountered: