[ERROR] [vite] x Build failed in 689ms Unexpected "const"
View-my-Git-Lab-krafi opened this issue · comments
Astro Info
Astro v4.11.0
Node v20.14.0
System Windows (x64)st-fontend-1> npx astro info
Package Manager npm
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
npx astro build
16:22:35 [types] Added src/env.d.ts type declarations.
16:22:35 [build] output: "static"
16:22:35 [build] directory: C:\Users\krafi\Desktop\web\Новая папка\astro-fast-fontend-2\dist\
16:22:35 [build] Collecting build info...
16:22:35 [build] ✓ Completed in 109ms.
16:22:35 [build] Building static entrypoints...
16:22:35 [types] Added src/env.d.ts type declarations.
16:22:36 [ERROR] [vite] x Build failed in 689ms
Unexpected "const"
Stack trace:
at failureErrorWithLog (C:\Users\krafi\Desktop\web\Новая папка\astro-fast-fontend-2\node_modules\esbuild\lib\main.js:1472:15)
at responseCallbacks.<computed> (C:\Users\krafi\Desktop\web\Новая папка\astro-fast-fontend-2\node_modules\esbuild\lib\main.js:622:9)
at Socket.readFromStdout (C:\Users\krafi\Desktop\web\Новая папка\astro-fast-fontend-2\node_modules\esbuild\lib\main.js:600:7)
at addChunk (node:internal/streams/readable:559:12)
at Readable.push (node:internal/streams/readable:390:5)
What's the expected result?
it should build
Link to Minimal Reproducible Example
https://gitlab.com/krafi/astro-fast-fontend-1
Participation
- I am willing to submit a pull request for this issue.
Please, use Discord for support. We use GitHub for filing bugs. This is most likely an issue in the user code.
@ematipico forget about the last comment i figure out the issue , https://gitlab.com/krafi/astro-fast-fontend-1/-/tree/bd4c5beee9a92060dd6935220e34b88dbdf1a55d
so, in my theme tag feature work perfectly when astro.config.mjs is
import { defineConfig } from 'astro/config';
//if you are using localhost PC
export default defineConfig({});
when when i change it to the netlify things
import { defineConfig } from 'astro/config';
import netlify from "@astrojs/netlify";
//If you are using netlify
export default defineConfig({ output: "server", adapter: netlify() });
and run it as localhost dev i got error on the [tags].astro feature if you need to read that file https://gitlab.com/krafi/astro-fast-fontend-1/-/blob/bd4c5beee9a92060dd6935220e34b88dbdf1a55d/src/pages/tags/%5Btag%5D.astro
Cannot read properties of undefined (reading 'map')
if i sent that netlify config i just see a blank page when i open the tags feature.