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

Import from package containing colon e.g. 'astro:content' #27599

Open
marvinhagemeister opened this issue Jan 9, 2025 Discussed in #27598 · 2 comments
Open

Import from package containing colon e.g. 'astro:content' #27599

marvinhagemeister opened this issue Jan 9, 2025 Discussed in #27598 · 2 comments
Labels
bug Something isn't working correctly node compat node resolution

Comments

@marvinhagemeister
Copy link
Contributor

Discussed in #27598

Originally posted by thibaultleouay January 9, 2025
I'm trying to use deno with astro, but i have one issue when importing

import { defineCollection } from 'astro:content';

The ide is crying with this error :

Uncached or missing remote URL: astro:contentdeno(no-cache)

How can i handle it?

@dsherret
Copy link
Member

dsherret commented Jan 9, 2025

What package is this? It would be surprising (but not surprising) if npm packages allowed colons in the name. I can't find this one though.

@nathanwhit
Copy link
Member

I believe it's a virtual module set up by astro's vite plugin.

They have type declarations for it https://github.com/withastro/astro/blob/df0c5665c1c1bbbaa878d01bca28d6558762ea00/packages/astro/templates/content/types.d.ts#L20, but the actual module doesn't exist until the vite plugin supplies it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat node resolution
Projects
None yet
Development

No branches or pull requests

3 participants