Open emyia2001 opened 1 month ago
你删掉原来的项目重新下载试试,会不会是npm包的下载问题
除此之外,我希望知道你的node版本
很奇怪,我无法复现,你的node版本是没问题的,看起来是vite的问题?
我重新说明一下如何运行
npm install
,注意不能出现errornpm run dev
我依旧觉得可能是你网络问题,包没有下载完全,如果还未能解决,请再联系我
重新clone了一次还是不行,但是可以直接部署到netlify上
我明天再看看吧
再试一次,重新clone然后运行npm install
17:51:10 watching for file changes... 17:51:12 [200] / 12ms 17:51:13 [ERROR] [vite] Internal server error: Transform failed with 1 error: E:/astro/hexw/src/layouts/RootLayout.astro?astro&type=script&index=0&lang.ts:2:7: ERROR: Expected "(" but found "{" Plugin: vite:esbuild File: E:/astro/hexw/src/layouts/RootLayout.astro?astro&type=script&index=0&lang.ts:2:7
Expected "(" but found "{" 1 | --- 2 | import { LOCALE } from "@/config"; | ^ 3 | import { ViewTransitions } from "astro:transitions"; 4 | interface Props {
17:51:13 [ERROR] [vite] Internal server error: [postcss] E:/astro/hexw/node_modules/astro/components/ViewTransitions.astro?astro&type=sty le&index=0&lang.css:1:1: Unknown word Plugin: vite:css File: E:/astro/hexw/node_modules/astro/components/ViewTransitions.astro?astro&type=style&index=0&lang.css:1:0 1 | --- | ^ 2 | type Fallback = 'none' | 'animate' | 'swap'; 3 |
at Input.error (E:\astro\hexw\node_modules\postcss\lib\input.js:106:16) at Parser.unknownWord (E:\astro\hexw\node_modules\postcss\lib\parser.js:593:22) at Parser.other (E:\astro\hexw\node_modules\postcss\lib\parser.js:435:12) at Parser.parse (E:\astro\hexw\node_modules\postcss\lib\parser.js:470:16) at parse (E:\astro\hexw\node_modules\postcss\lib\parse.js:11:12) at new LazyResult (E:\astro\hexw\node_modules\postcss\lib\lazy-result.js:133:16) at Processor.process (E:\astro\hexw\node_modules\postcss\lib\processor.js:53:14) at compileCSS (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:32272:63) at async TransformContext.transform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:31583:56) at async Object.transform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:51139:30) at async loadAndTransform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:53894:29) 17:51:13 [ERROR] [vite] Internal server error: Transform failed with 1 error: E:/astro/hexw/src/layouts/RootLayout.astro?astro&type=script&index=1&lang.ts:2:7: ERROR: Expected "(" but found "{" Plugin: vite:esbuild File: E:/astro/hexw/src/layouts/RootLayout.astro?astro&type=script&index=1&lang.ts:2:7
Expected "(" but found "{" 1 | --- 2 | import { LOCALE } from "@/config"; | ^ 3 | import { ViewTransitions } from "astro:transitions"; 4 | interface Props {
17:51:13 [ERROR] [vite] Internal server error: Transform failed with 1 error: E:/astro/hexw/node_modules/astro/components/ViewTransitions.astro?v=906590c6&astro&type=script&index=0&lang.ts:2:5: ERROR: Expect ed ";" but found "Fallback" Plugin: vite:esbuild File: E:/astro/hexw/node_modules/astro/components/ViewTransitions.astro?v=906590c6&astro&type=script&index=0&lang.ts:2:5
Expected ";" but found "Fallback" 1 | --- 2 | type Fallback = 'none' | 'animate' | 'swap'; | ^ 3 |
4 | export interface Props {
17:51:13 [ERROR] [vite] Internal server error: [postcss] E:/astro/hexw/src/components/Moving.astro?astro&type=style&index=0&lang. css:5:1: Unknown word Plugin: vite:css File: E:/astro/hexw/src/components/Moving.astro?astro&type=style&index=0&lang.css:5:0 3 | --- 4 |
5 | <div | ^ 6 | id="movingCircle" 7 | class="w-44 h-44 pointer-events-none rounded-full bg-ring/50 z-100 blur-3xl fixed" at Input.error (E:\astro\hexw\node_modules\postcss\lib\input.js:106:16) at Parser.unknownWord (E:\astro\hexw\node_modules\postcss\lib\parser.js:593:22) at Parser.decl (E:\astro\hexw\node_modules\postcss\lib\parser.js:236:16) at Parser.other (E:\astro\hexw\node_modules\postcss\lib\parser.js:399:18) at Parser.parse (E:\astro\hexw\node_modules\postcss\lib\parser.js:470:16) at parse (E:\astro\hexw\node_modules\postcss\lib\parse.js:11:12) at new LazyResult (E:\astro\hexw\node_modules\postcss\lib\lazy-result.js:133:16) at Processor.process (E:\astro\hexw\node_modules\postcss\lib\processor.js:53:14) at compileCSS (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:32272:63) at async TransformContext.transform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:31583:56) at async Object.transform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:51139:30) at async loadAndTransform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:53894:29) 17:51:13 [ERROR] [vite] Internal server error: [postcss] E:/astro/hexw/src/pages/index.astro?astro&type=style&index=0&lang.css:1: 1: Unknown word Plugin: vite:css File: E:/astro/hexw/src/pages/index.astro?astro&type=style&index=0&lang.css:1:0 1 | --- | ^ 2 | import RootLayout from "@/layouts/RootLayout.astro"; 3 | import { SocialIcons } from "@/components/SocialIcons"; at Input.error (E:\astro\hexw\node_modules\postcss\lib\input.js:106:16) at Parser.unknownWord (E:\astro\hexw\node_modules\postcss\lib\parser.js:593:22) at Parser.other (E:\astro\hexw\node_modules\postcss\lib\parser.js:435:12) at Parser.parse (E:\astro\hexw\node_modules\postcss\lib\parser.js:470:16) at parse (E:\astro\hexw\node_modules\postcss\lib\parse.js:11:12) at new LazyResult (E:\astro\hexw\node_modules\postcss\lib\lazy-result.js:133:16) at Processor.process (E:\astro\hexw\node_modules\postcss\lib\processor.js:53:14) at compileCSS (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:32272:63) at async TransformContext.transform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:31583:56) at async Object.transform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:51139:30) at async loadAndTransform (file:///E:/astro/hexw/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:53894:29) 17:51:13 [200] /about/ 35ms