Skip to content

Svelte cannot import @teamhanko/hanko-elements #905

Open
@HurricanKai

Description

@HurricanKai

Checklist

  • I could not find a solution in the existing issues or docs.
  • I agree to follow this project's Code of Conduct.

Describe the bug

All I get when following the guide & importing @teamhanko/hanko-elements is an error page "Unexpected token 'export'"

Reproducing the bug

  • Initialize a new Svelte Project
  • follow the tutorial (pasting the code into a +page.svelte somewhere, and replacing the API URL)
  • Observe Error Page

Logs

.../my_project/node_modules/.pnpm/@[email protected]/node_modules/@teamhanko/hanko-elements/dist/elements.js:2
<the entire line>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

SyntaxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25

Configuration

No response

Hanko Version

^0.8.0 (NPM package)

OS Hanko Backend

None

OS Version Hanko Backend

Using cloud. This should be irrelevant given it's a JS issue?

OS

Linux

OS Version

Arch Linux on 6.4.3-zen1-1-zen

Browser Version

Firefox Developer Edition v116.0b4

Environment

None

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    🔖 Up next

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions