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

Wrong path resolution to components into $lib at dev server start #2015

Closed
alexbruno opened this issue Jul 26, 2021 · 3 comments
Closed

Wrong path resolution to components into $lib at dev server start #2015

alexbruno opened this issue Jul 26, 2021 · 3 comments

Comments

@alexbruno
Copy link

Describe the bug

Wrong path resolution to components into $lib at dev server start, throwing an error 500.
While in development after server start it works, but at server start with npm run dev I have an error about path resolutions.
The error message shows that relative path to the component is duplicated.

Reproduction

Check this:

image

image

Page renders:

500
ENOENT: no such file or directory, open '/home/alxbr/github/media-centre-network/tempo-na-cidade/previsao-do-tempo/src/lib/components/base/src/lib/components/base/SiteMain.svelte'
Error: ENOENT: no such file or directory, open '/home/alxbr/github/media-centre-network/tempo-na-cidade/previsao-do-tempo/src/lib/components/base/src/lib/components/base/SiteMain.svelte'

Logs

[vite] page reload src/routes/index.svelte (x2)
ENOENT: no such file or directory, open '/home/alxbr/github/media-centre-network/tempo-na-cidade/previsao-do-tempo/src/lib/components/base/src/lib/components/base/SiteMain.svelte'
Error: ENOENT: no such file or directory, open '/home/alxbr/github/media-centre-network/tempo-na-cidade/previsao-do-tempo/src/lib/components/base/src/lib/components/base/SiteMain.svelte'
ENOENT: no such file or directory, open '/home/alxbr/github/media-centre-network/tempo-na-cidade/previsao-do-tempo/src/lib/components/base/src/lib/components/base/SiteMain.svelte'
Error: ENOENT: no such file or directory, open '/home/alxbr/github/media-centre-network/tempo-na-cidade/previsao-do-tempo/src/lib/components/base/src/lib/components/base/SiteMain.svelte'

System Info

npx: installed 1 in 0.891s

  System:
    OS: Linux 4.19 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 21.00 GB / 24.94 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v14.17.1/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.1/bin/npm
  npmPackages:
    @sveltejs/adapter-node: ^1.0.0-next.0 => 1.0.0-next.0 
    @sveltejs/kit: next => 1.0.0-next.137 
    svelte: ^3.40.2 => 3.40.2

Severity

blocking all usage of SvelteKit

Additional Information

I'm using it to develop a private project, so I can't share a link to a repo.
But, if needed, I can try to create a new repo just to reproduce this error.

@Conduitry
Copy link
Member

This is presumably the same as #2001. Try downgrading to Svelte 3.40.1.

@alexbruno
Copy link
Author

alexbruno commented Jul 26, 2021

Thanks!
It worked uninstalling svelte and installing it again with npm i -D svelte@3.40.1.
Is there an intended hotfix to svelte package to solve this?

@Conduitry
Copy link
Member

sveltejs/svelte#6572 should fix it, but we're considering holding off on that until a new release of Vite which should be happening tomorrow and which may also fix the issue. This does seem to be Svelte surfacing a bug in Vite rather than a bug in Svelte.

In either case, closing this issue, as it is indeed the same as #2001.

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