Skip to content

Is there SSR support that I am missing somewhere? #47

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

Closed
cgibsonmm opened this issue Mar 29, 2021 · 4 comments · Fixed by #105
Closed

Is there SSR support that I am missing somewhere? #47

cgibsonmm opened this issue Mar 29, 2021 · 4 comments · Fixed by #105
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@cgibsonmm
Copy link

With sapper I am running into

<Dropzone> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules

Any way to solve this out of the box?

@diegofhe
Copy link

diegofhe commented Apr 2, 2021

I had the same issue. A quick workaround is to put the component inside an if and setting a ready variable onMount.

Eg

<script>
    import Dropzone from 'svelte-file-dropzone';
    import {onMount} from 'svelte';
    let ready = false
  
    onMount(async () => {
        ready = true
    });
</script>

{#if ready}
    <Dropzone/>
{/if}

We can do this while waiting for the package to be updated

@thecodejack
Copy link
Owner

Sorry for late reply here. I will look into the issue in couple of days. Would welcome if we can get a PR for same.

@mylastore
Copy link

mylastore commented Jun 13, 2021

Confirm @diegofhe work around worked for me to Thanks ;)

@thecodejack thecodejack added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 23, 2021
@thecodejack
Copy link
Owner

unable to find time for this. Open for PRs.

@thecodejack thecodejack added this to the v1 milestone Jul 24, 2021
zwergius pushed a commit to zwergius/svelte-file-dropzone that referenced this issue Aug 9, 2022
Additionally, fix a potential issue with timout being invoked after destroying.

fixes thecodejack#47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants