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

Not allowed to load local ressource with npm run dev #8720

Closed
1 task
falco467 opened this issue Oct 2, 2023 · 2 comments · Fixed by #8724
Closed
1 task

Not allowed to load local ressource with npm run dev #8720

falco467 opened this issue Oct 2, 2023 · 2 comments · Fixed by #8724
Assignees
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)

Comments

@falco467
Copy link

falco467 commented Oct 2, 2023

Astro Info

Astro                    v3.2.1
Node                     v20.8.0
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/tailwind
                         @astrojs/svelte

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Possible Regression: This error only occurs with Astro 3.2.1 and not with 3.2.0

When running npm run dev and previewing the local page in a browser (Chrome, Edge, ...) the console reports a lot of errors:

Not allowed to load local resource: file:///C:/Workspace/myPage/src/components/myComponent.svelte?svelte&type=style&lang.css
Not allowed to load local resource: file:///C:/Workspace/myPage/src/components/components.svelte?svelte&type=style&lang.css
Not allowed to load local resource: file:///C:/Workspace/myPage/node_modules/@astrojs/tailwind/base.css

This error occurs for all CSS Styles.

This bug cannot easily be reproduced in the StackBlitz environment, since this will not generate local file urls, like on a local windows machine.

What's the expected result?

I would expect the page to work without problems exactly the way it does in astro 3.2.0. Current workaround is a downgrade to astro 3.2.0

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-cyjuhk-wuuptl?file=src%2Fpages%2Findex.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Oct 2, 2023
@bluwy
Copy link
Member

bluwy commented Oct 2, 2023

@falco467 can you show what the <head> HTML look like completely? It’s likely due to a change I made and I don’t have a windows machine at hand. That would help debugging this easier.

EDIT: nvm i figured it out.

@bis0072
Copy link

bis0072 commented Oct 2, 2023

Getting same messages
Astro v3.2.1
Node v18.17.1
System Windows (x64)
Package Manager npm
Output server
Adapter @astrojs/netlify
Integrations @astrojs/tailwind
@astrojs/sitemap
@astrojs/react

              Not allowed to load local resource: file:///D:/1%20Projects/A%20Latu%20Solutions/LATU%20SOLUTIONS/ASTRO%20SITES/astro-licway/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/astro/components/viewtransitions.css

localhost/:1 Not allowed to load local resource: file:///D:/1%20Projects/A%20Latu%20Solutions/LATU%20SOLUTIONS/ASTRO%20SITES/astro-licway/src/layouts/Layout.astro?astro&type=style&index=0&lang.css
localhost/:1 Not allowed to load local resource: file:///D:/1%20Projects/A%20Latu%20Solutions/LATU%20SOLUTIONS/ASTRO%20SITES/astro-licway/node_modules/.pnpm/@astrojs[email protected][email protected][email protected]/node_modules/@astrojs/tailwind/base.css

@bluwy bluwy self-assigned this Oct 2, 2023
@bluwy bluwy added - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) and removed needs triage Issue needs to be triaged labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants