Skip to content
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

Import issue when using esbuild #271

Closed
tbxMb opened this issue Nov 24, 2023 · 0 comments
Closed

Import issue when using esbuild #271

tbxMb opened this issue Nov 24, 2023 · 0 comments

Comments

@tbxMb
Copy link
Contributor

tbxMb commented Nov 24, 2023

When using a version > 2.6 (after fb61ada) i get the following error

✘ [ERROR] Could not resolve "svelte-routing"

    frontend/src/App.svelte:23:30:
      23 │ import { Router, Route } from "svelte-routing";
         ╵                               ~~~~~~~~~~~~~~~~

  The package target "src/index.js" is invalid because it doesn't start with "./":

    node_modules/svelte-routing/package.json:23:22:
      23 │             "svelte": "src/index.js"
         ╵                       ~~~~~~~~~~~~~~

  You can mark the path "svelte-routing" as external to exclude it from the bundle, which will
  remove this error and leave the unresolved path in the bundle.

changing src/index.js to ./src/index.js fixes the issue.

tbxMb added a commit to tbxMb/svelte-routing that referenced this issue Nov 24, 2023
krishnaTORQUE added a commit that referenced this issue Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants