Skip to content

Instantly share code, notes, and snippets.

@gabrielgrant
Created October 25, 2021 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielgrant/89a4835c30f562b0b4b220c20c868b14 to your computer and use it in GitHub Desktop.
Save gabrielgrant/89a4835c30f562b0b4b220c20c868b14 to your computer and use it in GitHub Desktop.
Simple example of Astro's upcoming v0.21 (v2 compiler) failing to serve a the minimal template

Repro steps:

$ npm init astro

# select Minimal

$ git add .
$ git commit -m "Init minimal Astro structure"
$ npm install astro@next--compiler
$ git add .
$ git commit -m "install astro@next--compiler"
$ npm run dev

> @example/minimal@0.0.1 dev /home/gabriel/repos/astro-next-test
> astro dev

10:07 AM [astro] Server started                               1147ms
10:07 AM [astro] Local: http://localhost:3000

# visit http://localhost:3000

10:07:25 AM [vite] Error when evaluating SSR module /home/gabriel/repos/astro-next-test/src/pages/index.astro:
Error: Cannot find module 'astro/internal' from '/home/gabriel/repos/astro-next-test/src/pages'
    at Function.resolveSync [as sync] (/home/gabriel/repos/astro-next-test/node_modules/resolve/lib/sync.js:102:15)
    at resolveFrom$3 (/home/gabriel/repos/astro-next-test/node_modules/astro/vendor/vite/dist/node/chunks/dep-35df7f96.js:3897:29)
    at resolve (/home/gabriel/repos/astro-next-test/node_modules/astro/vendor/vite/dist/node/chunks/dep-35df7f96.js:66565:22)
    at nodeImport (/home/gabriel/repos/astro-next-test/node_modules/astro/vendor/vite/dist/node/chunks/dep-35df7f96.js:66532:15)
    at ssrImport (/home/gabriel/repos/astro-next-test/node_modules/astro/vendor/vite/dist/node/chunks/dep-35df7f96.js:66467:20)
    at eval (/home/gabriel/repos/astro-next-test/src/pages/index.astro:3:37)
    at instantiateModule (/home/gabriel/repos/astro-next-test/node_modules/astro/vendor/vite/dist/node/chunks/dep-35df7f96.js:66510:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
10:07 AM [astro] 500 /                                        154ms
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment