Closed View-my-Git-Lab-krafi closed 4 days ago
one more thing import BlogPost from '../../components/BlogPost.astro'; file code is missing on astro doc tutorial
The typescript errors come from your tsconfig.json
, where you decided to use the astro/tsconfigs/strict
preset. If you wish to not have typescript errors, you should the astro/tsconfigs/base
preset.
The typescript errors come from your
tsconfig.json
, where you decided to use theastro/tsconfigs/strict
preset. If you wish to not have typescript errors, you should theastro/tsconfigs/base
preset.
i see, it remove all the error on vscode, but when i go to build
PS C:\Users\krafi\Desktop\web\astro-fast-fontend-1> npx astro build
16:03:17 [types] Added src/env.d.ts type declarations.
16:03:17 [vite] Re-optimizing dependencies because vite config has changed
16:03:17 [build] output: "static"
16:03:17 [build] directory: C:\Users\krafi\Desktop\web\astro-fast-fontend-1\dist\
16:03:17 [build] Collecting build info...
16:03:17 [build] ✓ Completed in 102ms.
16:03:17 [build] Building static entrypoints...
16:03:17 [types] Added src/env.d.ts type declarations.
16:03:18 [ERROR] [vite] x Build failed in 706ms
Unexpected "const"
Stack trace:
at failureErrorWithLog (C:\Users\krafi\Desktop\web\astro-fast-fontend-1\node_modules\esbuild\lib\main.js:1472:15)
at responseCallbacks.<computed> (C:\Users\krafi\Desktop\web\astro-fast-fontend-1\node_modules\esbuild\lib\main.js:622:9)
at Socket.readFromStdout (C:\Users\krafi\Desktop\web\astro-fast-fontend-1\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)
here is the brunch after i tried to do experiment with astro/tsconfigs/base https://gitlab.com/krafi/astro-fast-fontend-1/-/tree/astro_tsconfigs_strict_typesafety?ref_type=heads created another build error issue for this https://github.com/withastro/astro/issues/11416
last successful brunch with tag broken https://gitlab.com/krafi/astro-fast-fontend-1/-/tree/last_sucessfulbrunch_with_tag_broken
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.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
What's the expected result?
as you can see i comment out those error from vscode , if i try to build i will face the same, issue. i will see same error. the tags feature i made on my real project is not working i decided to follow tutorial again , but i end up with same error again. i was trying to configure with netlify .
and i write my astro.config.mjs
I dont know can i write it to use in both way one real [tag].astro and tags/index.astro i solve those error , but when i try to run with netlify it didnt work those feature became broken,
if you dont have time to think so solve or see this issue please give me some demo theme that have tags feature and also used with netlify
Link to Minimal Reproducible Example
https://gitlab.com/krafi/astro-fast-fontend-1
Participation