#Upgrading to content layer but weird error msg

26 messages · Page 1 of 1 (latest)

snow pecan
#

Ohoy! Here is my code https://github.com/ollecoffee/olle.coffee/pull/313, any clues to how to solve
Failed to load url /node_modules/astro/dist/content/.astro/content-assets.mjs (resolved id: /node_modules/astro/dist/content/.astro/content-assets.mjs). Does the file exist?

snow pecan
#

I reallly cant wrap my head around it Sob

gray sierra
#

Hi. Not sure what to say here. I've not really played with the new content layer stuff, but I tried cloning your repo's content-layer branch, did a pnpm i and pnpm start and I don't get the error. Maybe try purging your node_modules and re-installing? Can't suggest anything else as I haven't really looked into this side of things yet.

snow pecan
#

Is bun the issue? But it works with the legacy flag pandaston sadkitty

fluid python
#

Let me take a look and see

#

@snow pecan It worked just fine for me. I did a bun install & bun dev and no issues. Did a bun run build and it worked just fine.

snow pecan
#

I can run the server, but the website crash immediately. Tried in npm as well and its the same error as bun.

cyan heart
#

Could it be an issue related to bun version?

gray sierra
#

Don't know anything about bun, but it kind of looks like something is throwing the base path off? It's trying to access the .astro/ folder which should be in the root, but it's prefixing node_modules/... to it, so then cannot access it because it's looking in the wrong folder.

snow pecan
snow pecan
#

so u mean that the base here goes wrong? loader: glob({ pattern: '**\/[^_]*.mdx', base: "./src/content/blog" }),

cyan heart
#

For example, if you have base, why do you use a regex with a leading **? it's suggested by the docs though, that's ok then

#

Also, src/content is also used by the content collections, which could cause some weird behaviour

#

why don't you try to move the data outside of src/content?

snow pecan
#

Ahh!!!!!!! Finally

#

I use node 23

#

it works fine on node 22.9

#

but not on 23.0

#

should I report that somewhere?

cyan heart
#

no, because we don't support those kinds of Node.js releases

#

we suggest to always use active LTS with Astro

#

TL;DR, we don't support odd version numbers of Node.js

snow pecan
#

Aah, I see. Thanks so much Heartss houston_celebrate