### Astro Info
```block
astro info
astro : The term 'astro' is not recognized …as the name of a cmdlet, function, script file, or operable program. Check t
he spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ astro info
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (astro:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
```
### If this issue only occurs in one browser, which browser is a problem?
the issue is not in browser in build
### Describe the Bug
astro build error, when i try npm run dev it work
```
PS C:\Users\krafi\Desktop\web\astro-fast-fontend-1> npm run build
> astro-fast-fontend-1@0.0.1 build
> astro check && astro build
23:00:55 [types] Added src/env.d.ts type declarations.
23:00:55 Types generated 79ms
23:00:55 [check] Getting diagnostics for Astro files in C:\Users\krafi\Desktop\web\astro-fast-fontend-1...
src/layouts/MarkdownPostLayout.astro:20:29 - warning ts(7044): Parameter 'tag' implicitly has an 'any' type, but a better type may be inferred from usage.
20 frontmatter.tags.map((tag) => (
~~~
src/pages/index.astro:119:19 - error ts(2322): Type '{ children: any; key: number; }' is not assignable to type 'LiHTMLAttributes'.
Property 'key' does not exist on type 'LiHTMLAttributes'.
119 <li key={page}>
~~~
src/pages/index.astro:27:76 - error ts(2363): The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
27 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.date) - new Date(a.frontmatter.date));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pages/index.astro:27:45 - error ts(2362): The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
27 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.date) - new Date(a.frontmatter.date));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pages/api/tags.astro:26:5 - error ts(2552): Cannot find name 'headers'. Did you mean 'Headers'?
26 headers: {
~~~~~~~
src/pages/api/tags.astro:4:11 - error ts(2552): Cannot find name 'request'. Did you mean 'Request'?
4 const { request } = context;
~~~~~~~
src/pages/api/tags.astro:1:10 - error ts(2304): Cannot find name 'paginateTags'.
1 import { paginateTags } from '../../utils/paginateTags';
~~~~~~~~~~~~
src/pages/api/tags.astro:30:1 - error ts(1381): Unexpected token. Did you mean `{'}'}` or `}`?
30 }
~
src/pages/api/tags.astro:29:3 - error ts(1381): Unexpected token. Did you mean `{'}'}` or `}`?
29 });
~
src/pages/api/tags.astro:28:5 - error ts(1381): Unexpected token. Did you mean `{'}'}` or `}`?
28 }
~
src/pages/api/tags.astro:27:21 - error ts(1005): '}' expected.
27 'Content-Type': 'application/json'
~
src/pages/api/tags.astro:26:12 - error ts(1005): '}' expected.
26 headers: {
~
src/pages/api/tags.astro:20:5 - error ts(1381): Unexpected token. Did you mean `{'}'}` or `}`?
20 })),
~
src/pages/api/tags.astro:19:7 - error ts(1381): Unexpected token. Did you mean `{'}'}` or `}`?
19 }
~
src/pages/api/tags.astro:18:9 - error ts(1109): Expression expected.
18 return [];
~~~~~~
src/pages/api/tags.astro:17:7 - error ts(1381): Unexpected token. Did you mean `{'}'}` or `}`?
17 } else {
~
src/pages/api/tags.astro:16:30 - error ts(1382): Unexpected token. Did you mean `{'>'}` or `>`?
16 return tags.map(tag => tag.trim());
~
src/pages/api/tags.astro:16:9 - error ts(1109): Expression expected.
16 return tags.map(tag => tag.trim());
~~~~~~
src/pages/api/tags.astro:15:7 - error ts(1381): Unexpected token. Did you mean `{'}'}` or `}`?
15 } else if (Array.isArray(tags)) {
~
src/pages/api/tags.astro:14:41 - error ts(1382): Unexpected token. Did you mean `{'>'}` or `>`?
14 return tags.split(',').map(tag => tag.trim());
~
src/pages/api/tags.astro:14:9 - error ts(1109): Expression expected.
14 return tags.split(',').map(tag => tag.trim());
~~~~~~
src/pages/api/tags.astro:12:7 - error ts(1109): Expression expected.
12 const tags = post.frontmatter.tags;
~~~~~
src/pages/api/tags.astro:11:41 - error ts(1382): Unexpected token. Did you mean `{'>'}` or `>`?
11 ...new Set(allPosts.flatMap((post) => {
~
src/pages/api/tags.astro:4:3 - error ts(1109): Expression expected.
4 const { request } = context;
~~~~~
src/pages/blog/0.astro:6:76 - error ts(2363): The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
6 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.date) - new Date(a.frontmatter.date));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pages/blog/0.astro:6:45 - error ts(2362): The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
6 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.date) - new Date(a.frontmatter.date));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pages/blog/0.astro:26:14 - error ts(2339): Property 'style' does not exist on type 'Element'.
26 post.style.display = title.includes(query) ? 'block' : 'none';
~~~~~
src/pages/blog/0.astro:21:58 - error ts(2339): Property 'value' does not exist on type 'HTMLElement'.
21 const query = document.getElementById('searchBar').value.toLowerCase();
~~~~~
src/pages/blog/[page].astro:41:15 - error ts(2322): Type '{ children: any; key: number; }' is not assignable to type 'LiHTMLAttributes'.
Property 'key' does not exist on type 'LiHTMLAttributes'.
41 <li key={page}>
~~~
src/pages/blog/[page].astro:7:81 - error ts(2363): The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
7 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.pubDate) - new Date(a.frontmatter.pubDate));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pages/blog/[page].astro:7:47 - error ts(2362): The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
7 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.pubDate) - new Date(a.frontmatter.pubDate));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pages/blog/[page].astro:18:21 - warning ts(7044): Parameter 'post' implicitly has an 'any' type, but a better type may be inferred from usage.
18 {page.data.map((post) => (
~~~~
src/pages/blog/[page].astro:8:55 - warning ts(7044): Parameter 'page' implicitly has an 'any' type, but a better type may be inferred from usage.
8 return paginate(sortedPosts, { pageSize: 9, params: page => ({ pageNumber: page + 1 }) });
~~~~
src/pages/blog/[page].astro:7:41 - warning ts(7044): Parameter 'b' implicitly has an 'any' type, but a better type may be inferred from usage.
7 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.pubDate) - new Date(a.frontmatter.pubDate));
~
src/pages/blog/[page].astro:7:38 - warning ts(7044): Parameter 'a' implicitly has an 'any' type, but a better type may be inferred from usage.
7 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.pubDate) - new Date(a.frontmatter.pubDate));
~
src/pages/blog/index.astro:34:15 - error ts(2322): Type '{ children: any; key: number; }' is not assignable to type 'LiHTMLAttributes'.
Property 'key' does not exist on type 'LiHTMLAttributes'.
34 <li key={page}>
~~~
src/pages/blog/index.astro:6:76 - error ts(2363): The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
6 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.date) - new Date(a.frontmatter.date));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pages/blog/index.astro:6:45 - error ts(2362): The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
6 const sortedPosts = allPosts.sort((a, b) => new Date(b.frontmatter.date) - new Date(a.frontmatter.date));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pages/categories/[category].astro:27:17 - warning ts(7044): Parameter 'post' implicitly has an 'any' type, but a better type may be inferred from usage.
27 {posts.map((post) => (
~~~~
src/pages/categories/[category].astro:16:38 - warning ts(7044): Parameter 'post' implicitly has an 'any' type, but a better type may be inferred from usage.
16 props: { posts: allPosts.filter((post) => post.frontmatter.category === category) },
~~~~
src/pages/categories/[category].astro:14:32 - warning ts(7044): Parameter 'category' implicitly has an 'any' type, but a better type may be inferred from usage.
14 return uniqueCategories.map((category) => ({
~~~~~~~~
src/pages/categories/[category].astro:10:30 - warning ts(7044): Parameter 'post' implicitly has an 'any' type, but a better type may be inferred from usage.
10 ...new Set(allPosts.map((post) => post.frontmatter.category).filter(Boolean)),
~~~~
src/pages/tags/[tag].astro:47:18 - warning ts(7044): Parameter 'post' implicitly has an 'any' type, but a better type may be inferred from usage.
47 posts.map((post) => (
~~~~
src/pages/tags/[tag].astro:22:44 - warning ts(7044): Parameter 'post' implicitly has an 'any' type, but a better type may be inferred from usage.
22 const filteredPosts = allPosts.filter((post) => {
~~~~
src/pages/tags/[tag].astro:21:26 - warning ts(7044): Parameter 'tag' implicitly has an 'any' type, but a better type may be inferred from usage.
21 return uniqueTags.map((tag) => {
~~~
src/pages/tags/[tag].astro:9:34 - warning ts(7044): Parameter 'post' implicitly has an 'any' type, but a better type may be inferred from usage.
9 ...new Set(allPosts.flatMap((post) => {
~~~~
Result (31 files):
- 33 errors
- 0 warnings
- 13 hints
```
### What's the expected result?
i want see static form , and put it to github or gitlab page
### Link to Minimal Reproducible Example
https://gitlab.com/krafi/astro-fast-fontend-1
### Participation
- [X] I am willing to submit a pull request for this issue.