#Getting error
3 messages · Page 1 of 1 (latest)
Hi @stable cypress. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
The error message "Failed to resolve import 'virtual:image-loader'" suggests that there might be an issue with the way you're importing the Image component from @astrojs/image/components.
According to the Astro documentation (https://docs.astro.build/en/guides/integrations-guide/image#usage), the correct way to import the Image component is:
---
import { Image } from '@astrojs/image/components';
---
If you're still encountering issues, it might be due to an incompatibility between the @astrojs/image integration and Astro's built-in asset support. If you have enabled experimental asset support, you must uninstall the official integration. More information on this can be found in the Assets (Experimental) Guide (https://docs.astro.build/en/guides/assets/).
Also, ensure that any component you're importing and rendering is working correctly. If a component is not working properly, it can throw an error like the one you're experiencing. You can troubleshoot your component in a minimal Astro project by opening an Astro starter template from astro.new (https://astro.new) (source (https://docs.astro.build/en/guides/troubleshooting#expected-a-default-export)).