studiocms icon indicating copy to clipboard operation
studiocms copied to clipboard

[Bug] @astrojs/web-vitals is no longer optional

Open Adammatthiesen opened this issue 1 year ago • 1 comments

Describe the bug @astrojs/web-vitals is intended to be an optional install but is instead causing a drizzle error when not configured or installed.

To Reproduce Steps to reproduce the behavior: Setup a new astro Studio project with just StudioCMS and not the web-vitals package.

image

Stack Trace

TypeError: Cannot read properties of undefined (reading 'Symbol(drizzle:Columns)')
    at getTableColumns (file:///Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/drizzle-orm/utils.js:108:15)
    at SQLiteSelectBuilder.from (file:///Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:45:16)
    at Module.getWebVitals (/Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]__@types+react@18._oypmcuimgy4vsodn5ti6fqyzhy/node_modules/@astrolicious/studiocms/src/integrations/studioCMSDashboard/utils/webVital.ts:16:4)
    at /Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]__@types+react@18._oypmcuimgy4vsodn5ti6fqyzhy/node_modules/@astrolicious/studiocms/src/integrations/studioCMSDashboard/routes/dashboard/pages/index.astro:23:25
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async callComponentAsTemplateResultOrResponse (file:///Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/[email protected][email protected]/node_modules/astro/dist/runtime/server/render/astro/render.js:90:25)
    at async renderToAsyncIterable (file:///Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/[email protected][email protected]/node_modules/astro/dist/runtime/server/render/astro/render.js:132:26)
    at async renderPage (file:///Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/[email protected][email protected]/node_modules/astro/dist/runtime/server/render/page.js:31:24)
    at async lastNext (file:///Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/[email protected][email protected]/node_modules/astro/dist/core/render-context.js:131:25)
    at async callMiddleware (file:///Users/benjaminrenschvinterberg/Side-Projects/small-living/node_modules/.pnpm/[email protected][email protected]/node_modules/astro/dist/core/middleware/callMiddleware.js:11:10)

See Discord: Astrolicious > #support > "Getting studioCMS up and running." for more context.

Adammatthiesen avatar Aug 14 '24 22:08 Adammatthiesen

Branch issue-0264 created for issue: [Bug] @astrojs/web-vitals is no longer optional