21ctownball / townball-website

Public website for 21st Century Townball organization.
https://dev.21ctownball.com/
MIT License
0 stars 0 forks source link

Debug build script when building stats pages #17

Open rschubkegel opened 9 months ago

rschubkegel commented 9 months ago

Rename src/pages/_stats/ to src/pages/stats/ and run yarn build to replicate. The relevant lines of build output are included below.

21:10:47 ▶ src/pages/stats/games/[date].astro
21:10:47   ├─ /stats/games/2023-06-27/index.htmlCannot find module 'C:\src\stats\games\2023-06-27-CGBNBQ-scbd.csv' imported from C:\Users\Rylan\Documents\Repositories\Personal\townball-website\dist\chunks\prerender_EyMGLm7U.mjs
  Stack trace:
    at finalizeResolution (node:internal/modules/esm/resolve:255:11)
    at defaultResolve (node:internal/modules/esm/resolve:1121:11)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.import (node:internal/modules/esm/loader:328:34)
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:176:14)
error Command failed with exit code 1.
rschubkegel commented 1 month ago

I tried creating a new project with yarn create astro and was able to build a project with @rollup/plugin-dsv. I'm still not sure why the build error occurs, but my current guess is that custom file imports in Rollup are somehow incompatible with Astro.glob. Another possibility is that custom file extensions can't be imported with TS path aliases. Whatever the reason, I think these are the next steps: