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

Deleting and recreating a file results in a persistent * Failed to load url* error #14074

Closed
7 tasks done
lovasoa opened this issue Aug 10, 2023 · 2 comments
Closed
7 tasks done

Comments

@lovasoa
Copy link
Contributor

lovasoa commented Aug 10, 2023

Describe the bug

In a sveltekit project, in dev mode with hmr activated, deleting a file and recreating it breaks the project.

frontend              | Error: Failed to load url ../../buttons/Button.svelte (resolved id: ../../buttons/Button.svelte) in /app/patterm/frontend/packages/enexflow-component/src/lib/page_elements/side_bar/Sidebar.svelte. Does the file exist?
frontend              | [0]     at loadAndTransform (file:///app/patterm/frontend/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-abb4f102.js:54840:21)
frontend              | [0]     at async instantiateModule (file:///app/patterm/frontend/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-abb4f102.js:55776:10) {
frontend              | [0]   code: 'ERR_LOAD_URL'
frontend              | [0] }

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-mqecep?description=The%20default%20SvelteKit%20template,%20generated%20with%20create-svelte&file=src%2Froutes%2Fstyles.css&title=SvelteKit%20Default%20Template

Steps to reproduce

  • In a svelte kit project running in dev mode, run mv MyComponent.svelte MyComponent2.svelte
  • reload the page, you will (rightly) see an error
  • run mv MyComponent2.svelte MyComponent.svelte
  • on reload, you see an internal server error

image

System Info

System:
    OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-11390H @ 3.40GHz
    Memory: 1.48 GB / 15.36 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 16.20.2 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.19.4 - /usr/bin/npm
  Browsers:
    Chrome: 115.0.5790.170
    Firefox: 116.0.2
  npmPackages:
    vite: ^4.3.4 => 4.3.4

Used Package Manager

npm

Logs

Click to expand!
frontend              | [0] Internal server error: Failed to load url ../../buttons/Button.svelte (resolved id: ../../buttons/Button.svelte) in /app/patterm/frontend/packages/enexflow-component/src/lib/page_elements/side_bar/Sidebar.svelte. Does the file exist?
frontend              | [0]       at loadAndTransform (file:///app/patterm/frontend/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-abb4f102.js:54840:21)
frontend              | [0]       at async instantiateModule (file:///app/patterm/frontend/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-abb4f102.js:55776:10)
frontend              | [0] 
frontend              | Error: Failed to load url ../../buttons/Button.svelte (resolved id: ../../buttons/Button.svelte) in /app/patterm/frontend/packages/enexflow-component/src/lib/page_elements/side_bar/Sidebar.svelte. Does the file exist?
frontend              | [0]     at loadAndTransform (file:///app/patterm/frontend/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-abb4f102.js:54840:21)
frontend              | [0]     at async instantiateModule (file:///app/patterm/frontend/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-abb4f102.js:55776:10) {
frontend              | [0]   code: 'ERR_LOAD_URL'
frontend              | [0] }

Validations

@stackblitz
Copy link

stackblitz bot commented Aug 10, 2023

@bluwy
Copy link
Member

bluwy commented Nov 9, 2023

This seems to be fixed by #14315

@bluwy bluwy closed this as completed Nov 9, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants