Skip to content

Svelte error: mount() not available on the server #1274

@m-krebs

Description

@m-krebs

Describe the bug

When creating a wxt project with svelte, the following error occurs in console:

Uncaught Svelte error: lifecycle_function_unavailable
`mount(...)` is not available on the server

This error was discussed in #1228 and should (as of my understanding) be fixed by using @wxt-dev/[email protected].

Reproduction

reproduction.zip

Steps to reproduce

Run pnpm dlx wxt@latest init, follow the setup and select svelte.
Then cd into the project and replace @wxt-dev/module-svelte: ^2.0.0 with @wxt-dev/module-svelte: ^2.0.1.
Install dependencies: pnpm i.
Build and zip the extension: pnpm zip:firefox.
Visit about:debugging#/runtime/this-firefox and load temporary Add-on.
Click the Add-ons Icon in Add-on bar and check console in Add-on Inspector.

System Info

System:
    OS: Linux 6.6 Manjaro Linux
    CPU: (16) x64 AMD Ryzen 7 5800X3D 8-Core Processor
    Memory: 25.36 GB / 31.27 GB
    Container: Yes
    Shell: 3.7.1 - /bin/fish
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    npm: 10.5.0 - ~/.local/share/pnpm/npm
    pnpm: 9.15.0 - ~/.local/share/pnpm/pnpm
  Browsers:
    Chromium: 131.0.6778.108
  npmPackages:
    wxt: ^0.19.13 => 0.19.22

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions