-
Notifications
You must be signed in to change notification settings - Fork 39
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
TypeError: append_styles is not a function #47
Comments
Same thing is happening to me after I tried bundling with
However, it was working properly when building with Vite |
Thank you @rodryquintero for the input. Did you use the wrapRouter example and did you write it in TS? Did you write your tests using TS which had to be transformed with ts-jest? Just wondering what works and what doesn't. :) |
Hey.
No. I did not use TS nor I use wrapRouter.
This happened when i tried moving my build from Vite to Esbuild.
On Sun, Sep 26, 2021 at 5:49 AM asode ***@***.***> wrote:
Thank you @rodryquintero <https://github.com/rodryquintero> for the
input. Did you use the wrapRouter example and did you write it in TS? Did
you write your tests using TS which had to be transformed with ts-jest?
Just wondering what works and what doesn't. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJWMSV52LENT7SSWQJCHLDUD33FFANCNFSM5ETAY6NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
**** Ivan Quintero
|
No, I did not. Will give it a try.
It works fine with Vite. But build times take longer.
On Sat, Oct 2, 2021 at 1:07 AM Charley Wu ***@***.***> wrote:
Hi, @asode <https://github.com/asode>
the append_styles was a breaking change of internal API since svelte
3.40.0 <https://github.com/sveltejs/svelte/blob/master/CHANGELOG.md#3400>
see HERE <https://github.com/sveltejs/svelte/pull/5870/files#r682390252>
for details
have you tried to downgrade the svelte version to 3.39.0?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJWMSTQWB2G3OJ7D7UX3RDUE2ORVANCNFSM5ETAY6NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
**** Ivan Quintero
|
Hi, First, we need a custom jest resolver and an exception to tell jest to transform the svelte-navigator source code. My package.json
jestResolver.cjs
babel.config.json
If you haven't installed babel and babel jest, run the following I hope this can be useful :) |
Another workaround I've found is to import the component sources directly so that they're compiled using the latest version of svelte i.e.
becomes:
|
How did you fix it? I don't think downgrade svelte to run tests is a proper solution, also it makes another issues in the app itself |
Describe the bug
When using renderWithRouter with jest + TypeScript the following error occurs:
To Reproduce
Here's a repo to reproduce the error.
Here's the error reproduced in GitHub Actions
Expected behavior
No error and succesfully rendering the component with the wrapped router.
The text was updated successfully, but these errors were encountered: