one-aalam / astro-ink

Crisp, minimal, personal blog theme for Astro
https://astro-ink.vercel.app
MIT License
556 stars 93 forks source link

Markdoc error after install #40

Closed bronze closed 12 months ago

bronze commented 1 year ago

Hi Ive just done a fresh install and after cloning and doing a pnpm i i get this error:

9:20:07 AM [vite] Error when evaluating SSR module /home/bronze/coding/astro-ink/astro.config.mjs: failed to import "@astrojs/markdoc"

09:20:07 AM [astro] Unable to load /home/bronze/coding/astro-ink/astro.config.mjs

 error   The requested module 'astro/assets' does not provide an export named 'emitESMImage'
file:///home/bronze/coding/astro-ink/node_modules/.pnpm/@astrojs+markdoc@0.1.0_astro@2.1.0_react@18.2.0/node_modules/@astrojs/markdoc/dist/index.js:5
import { emitESMImage } from "astro/assets";
         ^^^^^^^^^^^^
SyntaxError: The requested module 'astro/assets' does not provide an export named 'emitESMImage'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

I only managed to run the dev server after i commented out the import markdoc from "@astrojs/markdoc"; line at https://github.com/one-aalam/astro-ink/blob/main/astro.config.mjs#L9

one-aalam commented 1 year ago

Apologies for the trouble @bronze. There seems to be an issue with Markdoc integration and Astro's latest Vercel server builds - https://github.com/one-aalam/astro-ink/blob/main/astro.config.mjs#L38. I'm trying to find out a fix, if it doesn't works I'll disable the support of Markdoc for now.

bronze commented 1 year ago

Hey man no trouble! Just opened this to give you a heads up. :) Thank you for your work on this!