我把我的 Next.js 項目轉成 TypeScript 之後就出現以下問題
成功
yarn dev
失敗
yarn build
yarn run v1.22.17
$ next build && node ./scripts/generate-sitemap
info - Loaded env from A:\小康 Files\Github\網站\honghong-me\.env.local
info - Checking validity of types ..
部署在 Vercel 上的 log
Cloning github.com/TszHong0411/honghong.me (Branch: main, Commit: 897217e)
Cloning completed: 747.432ms
Analyzing source code...
Installing build runtime...
Build runtime installed: 3.031s
Looking up build cache...
Build cache downloaded [291.67 MB]: 10268.691ms
Installing dependencies...
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "next-pwa > babel-loader@8.2.3" has unmet peer dependency "@babel/core@^7.0.0".
warning "next-pwa > babel-loader@8.2.3" has unmet peer dependency "webpack@>=2".
warning "next-pwa > clean-webpack-plugin@4.0.0" has unmet peer dependency "webpack@>=4.0.0 <6.0.0".
warning "next-pwa > terser-webpack-plugin@5.3.1" has unmet peer dependency "webpack@^5.1.0".
warning "next-pwa > workbox-webpack-plugin@6.4.2" has unmet peer dependency "webpack@^4.4.0 || ^5.9.0".
warning " > react-textfit@1.1.1" has incorrect peer dependency "react@^15.0.0 || ^16.0.0".
warning " > react-textfit@1.1.1" has incorrect peer dependency "react-dom@^15.0.0 || ^16.0.0".
warning " > compression-webpack-plugin@9.2.0" has unmet peer dependency "webpack@^5.1.0".
warning " > file-loader@6.2.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
$ prisma generate || true
Prisma schema loaded from prisma/schema.prisma
✔ Generated Prisma Client (3.9.2 | library) to ./node_modules/@prisma/client in 130ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
$ husky install
husky - Git hooks installed
Done in 81.61s.
Detected Next.js version: 12.1.0
Running "yarn run build"
yarn run v1.22.17
$ next build && node ./scripts/generate-sitemap
info - Checking validity of types...
killing sandbox due to timeout1 3600000ms
已嘗試刪除 node_modules 然後重新安裝
請問可以怎樣 解決 或 debug
github repo:
https://github.com/TszHong0411/honghong.me