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

Failed to load url error, after page refresh #9923

Closed
praful-hunde opened this issue May 14, 2023 · 1 comment
Closed

Failed to load url error, after page refresh #9923

praful-hunde opened this issue May 14, 2023 · 1 comment

Comments

@praful-hunde
Copy link

praful-hunde commented May 14, 2023

Describe the bug

I get the below error after refreshing the page in the browser. Below is an image of the error shown in the browser.
image
The error occurs when I refresh the page while running with vscode and "pnpm run dev"
The error does not occur in production/preview mode OR when hosted on Versel.

The error suggests that the CSS file is missing, but there is no separate CSS file for the page, it's only inline CSS.

Reproduction

The code is available here

npm i
npm run dev
Click the Exercises link and then refresh the page.

Logs

Internal server error: Failed to load url /src/routes/Exercises/Nested%20components/+page.svelte?svelte=&type=style&lang.css=&inline= (resolved id: /src/routes/Exercises/Nested%20components/+page.svelte?svelte&type=style&lang.css). Does the file exist?
      at loadAndTransform (file:///C:/Sourcecode/Svelte/learnSvelte/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-a178814b.js:53325:21)

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz   
    Memory: 4.38 GB / 15.73 GB
  Binaries:
    Node: 16.17.1 - C:\Program Files\nodejs\node.EXE
    npm: 8.10.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.68)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.0.1
    @sveltejs/kit: ^1.5.0 => 1.15.9
    svelte: ^3.54.0 => 3.58.0
    vite: ^4.3.0 => 4.3.3

Severity

annoyance

Additional Information

My guess is #9894 will resolve this i.e. #9923.

@isaacwein
Copy link

isaacwein commented May 14, 2023

I have the same error I Reproduced the issue in stakblitz and I asked on stack overflow too

if you read the error closly you can see that sveltekit changing your import url from import testCSS from './test.css?url' to import testCSS from './test.css?url=&inline=' the additional &inline query creates the whole error I tried it with a plain vite project and that change triggered it i wander why sveltekit is Modifying the url

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

3 participants