withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.81k stars 2.49k forks source link

Astro:db Seed File Fails to be Loaded | "Failed to load url" #11148

Closed JohannesWM closed 5 months ago

JohannesWM commented 5 months ago

Astro Info

Astro                    v4.9.1
Node                     v20.13.1
System                   Windows (x64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/tailwind
                         @astrojs/sitemap
                         astro:db
                         @astrojs/db/file-url

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

Not a browser issue

Describe the Bug

Running npm run dev leads to the same error regarding the db/seed.ts file.

[ERROR] [astro:db] Failed to load url /C:/Users... (resolved id: /C:/Users...). Does the file exist?

Additional Information

What's the expected result?

I expect the seed.ts file to initialize properly and load all of my db information into my local database when I begin to localhost.

Link to Minimal Reproducible Example

https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics?file=README.md

Participation

JohannesWM commented 5 months ago

I debugged this one myself! The issue... there was a space in one of my enclosing folders. Not sure what causes this, but for anyone struggling to find any information on a solution, no folders should have spaces!

github-actions[bot] commented 5 months ago

Hello @JohannesWM. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

IanRestrepo commented 3 weeks ago

Hi @JohannesWM i have the same problem rn, can you help me? 😔

JohannesWM commented 3 weeks ago

Hi, it turned out to be an issue with the directories. It turns out that there was a space in one of my directory names which was messing with the seed file. I recommend checking if where you store your projects, or any super directories have a space in their name. Good luck!