#Cannot find module 'astro:content' or its corresponding type declarations.

6 messages · Page 1 of 1 (latest)

summer elk
#

Hi, I have a problem.
I'm trying to make a plugin for astro, I put devDependecies astro in it, I need getCollection from it, but when I give import { getCollection} from astro:content'`, it tells me it can't find this module.

I gave pnpm astro sync, I also did a test content, it doesn't want to get this module.
I should point out that a console.log() on the getCollection function returns the test data from the content.

rigid hawk
#

Have you tried simply restarting your editor after running astro sync?

#

Note that astro dev, astro build etc also run sync implicitely. So it doesn't have to be that command specifically

summer elk
#

@rigid hawk did you know why?

#

I restarted vscode, reloaded window but didnt work

#

reloaded language script