#Failed to resolve import source "astro:content".

3 messages · Page 1 of 1 (latest)

soft hound
#

I've been trying to convert some components in my app from react to vue and i ran into an issue where, for some reason, vue's compiler can't find astro:content. It happened only in Vue component and not React component so its not a "astro:content was not installed type of issue". Also for some reason it asked me to install typescript even tho it should be able to pull astro's typescript i think.
Here's the link for repo: https://github.com/JohnBakhmat/johnbakhmat.tech/blob/vue/src/components/BlogView.vue

also weird thing, i have this path: Astro Page -> BlogView.vue -> Post.vue, and error is thrown in Post. I would think it is supposed to break at BlogView coz both import this type

GitHub

Personal site. Contribute to JohnBakhmat/johnbakhmat.tech development by creating an account on GitHub.

#

Here's dependency versions ```json
"dependencies": {
"@astrojs/mdx": "^3.0.1",
"@astrojs/node": "^8.2.5",
"@astrojs/react": "^3.4.0",
"@astrojs/rss": "^4.0.6",
"@astrojs/sitemap": "^3.1.5",
"@astrojs/vue": "^4.3.0",
"@headlessui/react": "^1.7.19",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vercel/analytics": "^1.3.1",
"astro": "^4.9.1",
"fuse.js": "^6.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"reading-time": "^1.5.0",
"rehype-autolink-headings": "^6.1.1",
"shiki": "^0.14.7",
"shiki-themes": "^0.2.7",
"typescript": "^5.4.5",
"vue": "^3.4.27"
},
"devDependencies": {
"@unocss/reset": "^0.55.7",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"unocss": "^0.60.3",
"unocss-preset-scrollbar": "^0.2.1"
}

soft hound
#

i figured what was causing it, so when you defineProps you can't pass ContentEntry as into its generic