Innei / Shiro

📜 A minimalist personal website embodying the purity of paper and freshness of snow.
https://innei.in
Other
3.27k stars 698 forks source link

通过 Vercel 部署失败 #374

Closed xgenya closed 3 months ago

xgenya commented 3 months ago

Describe the bug

fork Shiro 仓库, 在 Vercel 中配置环境变量, 点击部署, 提示 Build Failed 删除项目后重新部署, 结果一样

image

Reproduction

null

System Info

[12:38:36.092] Running build in Washington, D.C., USA (East) – iad1
[12:38:36.272] Cloning github.com/xgenya/Shiro (Branch: main, Commit: fec6f9b)
[12:38:36.300] Skipping build cache, deployment was triggered without cache.
[12:38:37.314] Cloning completed: 1.042s
[12:38:38.541] Running "vercel build"
[12:38:39.452] Vercel CLI 34.2.4
[12:38:40.600] Warning: Detected "engines": { "node": ">=18" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
[12:38:40.661] Detected `pnpm-lock.yaml` version 9 generated by pnpm 9
[12:38:40.709] Installing dependencies...
[12:38:41.843]  WARN  This project is configured to use v9.1.2 of pnpm. Your current pnpm is v9.1.4
[12:38:42.028] Lockfile is up to date, resolution step is skipped
[12:38:42.330] Progress: resolved 1, reused 0, downloaded 0, added 0
[12:38:42.727] Packages: +946
[12:38:42.728] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[12:38:43.376] Progress: resolved 946, reused 0, downloaded 0, added 0
[12:38:44.376] Progress: resolved 946, reused 0, downloaded 20, added 5
[12:38:45.378] Progress: resolved 946, reused 0, downloaded 61, added 50
[12:38:46.379] Progress: resolved 946, reused 0, downloaded 122, added 108
[12:38:47.397] Progress: resolved 946, reused 0, downloaded 123, added 108
[12:38:48.400] Progress: resolved 946, reused 0, downloaded 138, added 122
[12:38:49.407] Progress: resolved 946, reused 0, downloaded 172, added 158
[12:38:50.406] Progress: resolved 946, reused 0, downloaded 186, added 172
[12:38:51.407] Progress: resolved 946, reused 0, downloaded 187, added 178
[12:38:52.408] Progress: resolved 946, reused 0, downloaded 202, added 186
[12:38:53.409] Progress: resolved 946, reused 0, downloaded 219, added 208
[12:38:54.411] Progress: resolved 946, reused 0, downloaded 294, added 279
[12:38:55.412] Progress: resolved 946, reused 0, downloaded 361, added 350
[12:38:56.411] Progress: resolved 946, reused 0, downloaded 443, added 430
[12:38:57.412] Progress: resolved 946, reused 0, downloaded 473, added 465
[12:38:58.416] Progress: resolved 946, reused 0, downloaded 492, added 481
[12:38:59.420] Progress: resolved 946, reused 0, downloaded 575, added 561
[12:39:00.420] Progress: resolved 946, reused 0, downloaded 602, added 588
[12:39:01.420] Progress: resolved 946, reused 0, downloaded 661, added 650
[12:39:02.421] Progress: resolved 946, reused 0, downloaded 819, added 816
[12:39:03.311] Progress: resolved 946, reused 0, downloaded 945, added 946, done
[12:39:03.616] .../node_modules/@clerk/shared postinstall$ node ./scripts/postinstall.mjs
[12:39:04.947] .../node_modules/@biomejs/biome postinstall$ node scripts/postinstall.js
[12:39:04.947] .../node_modules/simple-git-hooks postinstall$ node ./postinstall.js
[12:39:04.977] .../node_modules/utf-8-validate install$ node-gyp-build
[12:39:04.979] .../node_modules/bufferutil install$ node-gyp-build
[12:39:05.089] .../node_modules/@clerk/shared postinstall: Done
[12:39:05.103] .../node_modules/@biomejs/biome postinstall: Done
[12:39:05.178] .../node_modules/utf-8-validate install: Done
[12:39:05.181] .../node_modules/simple-git-hooks postinstall: [INFO] Successfully set the pre-commit with command: pnpm exec lint-staged
[12:39:05.198] .../node_modules/simple-git-hooks postinstall: Done
[12:39:05.256] .../node_modules/bufferutil install: Done
[12:39:05.495] 
[12:39:05.496] dependencies:
[12:39:05.497] + @aws-sdk/client-s3 3.583.0
[12:39:05.497] + @clerk/nextjs 5.1.2
[12:39:05.497] + @clerk/themes 2.1.7
[12:39:05.497] + @excalidraw/excalidraw 0.17.6
[12:39:05.497] + @floating-ui/react-dom 2.1.0
[12:39:05.497] + @milkdown/core 7.3.6
[12:39:05.497] + @milkdown/ctx 7.3.6
[12:39:05.497] + @milkdown/plugin-clipboard 7.3.6
[12:39:05.497] + @milkdown/plugin-diagram 7.3.6
[12:39:05.497] + @milkdown/plugin-history 7.3.6
[12:39:05.497] + @milkdown/plugin-indent 7.3.6
[12:39:05.497] + @milkdown/plugin-listener 7.3.6
[12:39:05.497] + @milkdown/preset-commonmark 7.3.6
[12:39:05.498] + @milkdown/preset-gfm 7.3.6
[12:39:05.498] + @milkdown/prose 7.3.6
[12:39:05.498] + @milkdown/react 7.3.6
[12:39:05.498] + @milkdown/transformer 7.3.6
[12:39:05.498] + @milkdown/utils 7.3.6
[12:39:05.498] + @mx-space/api-client 1.13.1
[12:39:05.498] + @prosemirror-adapter/react 0.2.6
[12:39:05.498] + @radix-ui/react-dialog 1.0.5
[12:39:05.498] + @radix-ui/react-label 2.0.2
[12:39:05.498] + @radix-ui/react-scroll-area 1.0.5
[12:39:05.498] + @radix-ui/react-select 2.0.0
[12:39:05.498] + @radix-ui/react-switch 1.0.3
[12:39:05.498] + @radix-ui/react-tabs 1.0.4
[12:39:05.498] + @shikijs/transformers 1.6.0
[12:39:05.498] + @shiro/fetch <- packages/fetch
[12:39:05.498] + @tanstack/query-async-storage-persister 5.37.1
[12:39:05.498] + @tanstack/react-query 5.37.1
[12:39:05.498] + @tanstack/react-query-devtools 5.37.1
[12:39:05.498] + @tanstack/react-query-persist-client 5.37.1
[12:39:05.498] + @upstash/redis 1.31.2
[12:39:05.498] + @vercel/analytics 1.3.1
[12:39:05.498] + @vercel/postgres 0.8.0
[12:39:05.498] + bypass-vue-devtools 0.0.6
[12:39:05.498] + chroma-js 2.4.2
[12:39:05.498] + clsx 2.1.1
[12:39:05.499] + colorjs.io 0.5.0
[12:39:05.499] + crossbell 1.11.9
[12:39:05.499] + daisyui 4.11.1
[12:39:05.499] + dayjs 1.11.11
[12:39:05.499] + emoji-mart 5.6.0
[12:39:05.499] + emoji-picker-react 4.9.3
[12:39:05.499] + foxact 0.2.33
[12:39:05.499] + framer-motion 11.1.7
[12:39:05.499] + fuse.js 7.0.0
[12:39:05.499] + idb-keyval 6.2.1
[12:39:05.499] + immer 10.1.1
[12:39:05.499] + jojoo 0.1.4
[12:39:05.499] + jotai 2.8.1
[12:39:05.499] + js-cookie 3.0.5
[12:39:05.499] + js-yaml 4.1.0
[12:39:05.499] + jsondiffpatch 0.6.0
[12:39:05.499] + kbar 0.1.0-beta.45
[12:39:05.499] + markdown-escape 2.0.0
[12:39:05.499] + markdown-to-jsx <- @innei/markdown-to-jsx 7.2.1-beta.6
[12:39:05.499] + marked 12.0.2
[12:39:05.499] + medium-zoom 1.1.0
[12:39:05.499] + mermaid 10.9.1
[12:39:05.499] + nanoid 5.0.7
[12:39:05.499] + next 14.2.3
[12:39:05.499] + next-runtime-env 3.2.2
[12:39:05.499] + next-themes 0.3.0
[12:39:05.499] + ofetch 1.3.4
[12:39:05.499] + openai 4.47.1
[12:39:05.499] + pngjs 7.0.0
[12:39:05.499] + prop-types 15.8.1
[12:39:05.499] + qrcode.react 3.1.0
[12:39:05.499] + react 18.3.1
[12:39:05.500] + react-dom 18.3.1
[12:39:05.500] + react-error-boundary 4.0.13
[12:39:05.500] + react-intersection-observer 9.10.2
[12:39:05.500] + react-responsive-masonry 2.2.0
[12:39:05.500] + react-toastify 10.0.5
[12:39:05.500] + react-tweet 3.2.1
[12:39:05.500] + remark-directive 3.0.0
[12:39:05.500] + remove-markdown 0.5.0
[12:39:05.500] + rss 1.2.2
[12:39:05.500] + server-only 0.0.1
[12:39:05.500] + socket.io-client 4.7.5
[12:39:05.500] + tailwind-merge 2.3.0
[12:39:05.500] + unidata.js 0.8.0
[12:39:05.500] + unified 11.0.4
[12:39:05.500] + uniqolor 1.1.1
[12:39:05.500] + unist-util-visit 5.0.0
[12:39:05.500] + use-context-selector 2.0.0
[12:39:05.500] + vaul 0.9.1
[12:39:05.500] + xss 1.0.15
[12:39:05.500] 
[12:39:05.500] devDependencies:
[12:39:05.500] + @biomejs/biome 1.7.3
[12:39:05.500] + @iconify-json/material-symbols 1.1.80
[12:39:05.500] + @iconify-json/mingcute 1.1.17
[12:39:05.500] + @iconify/tailwind 1.1.1
[12:39:05.500] + @innei/prettier 0.13.1
[12:39:05.500] + @mx-space/webhook 0.3.0
[12:39:05.500] + @next/bundle-analyzer 14.2.3
[12:39:05.500] + @tailwindcss/container-queries 0.1.1
[12:39:05.500] + @tailwindcss/typography 0.5.13
[12:39:05.501] + @types/chroma-js 2.4.4
[12:39:05.501] + @types/js-cookie 3.0.6
[12:39:05.501] + @types/js-yaml 4.0.9
[12:39:05.501] + @types/markdown-escape 1.1.3
[12:39:05.501] + @types/node 20.12.12
[12:39:05.501] + @types/pngjs 6.0.5
[12:39:05.501] + @types/react 18.3.3
[12:39:05.501] + @types/react-dom 18.3.0
[12:39:05.501] + @types/react-responsive-masonry 2.1.3
[12:39:05.501] + @types/remove-markdown 0.3.4
[12:39:05.501] + @types/rss 0.0.32
[12:39:05.501] + autoprefixer 10.4.19
[12:39:05.501] + client-only 0.0.1
[12:39:05.501] + cross-env 7.0.3
[12:39:05.501] + dotenv 16.4.5
[12:39:05.501] + lint-staged 15.2.5
[12:39:05.501] + postcss 8.4.38
[12:39:05.501] + postcss-import 16.1.0
[12:39:05.501] + postcss-js 4.0.1
[12:39:05.501] + postcss-nested 6.0.1
[12:39:05.502] + postcss-preset-env 9.5.14
[12:39:05.503] + postcss-prune-var 1.1.2
[12:39:05.503] + prettier 3.2.5
[12:39:05.503] + rimraf 5.0.7
[12:39:05.503] + shiki 1.6.0
[12:39:05.503] + simple-git-hooks 2.11.1
[12:39:05.503] + tailwind-scrollbar 3.1.0
[12:39:05.503] + tailwind-variants 0.2.1
[12:39:05.503] + tailwindcss 3.4.3
[12:39:05.503] + tailwindcss-animated 1.0.1
[12:39:05.503] + typescript 5.4.5
[12:39:05.503] + zx 8.1.1
[12:39:05.503] 
[12:39:05.539] 
[12:39:05.539] > Shiro@1.1.3 prepare /vercel/path0
[12:39:05.539] > pnpm exec simple-git-hooks && test -f .env || cp .env.template .env
[12:39:05.539] 
[12:39:06.123] [INFO] Successfully set the pre-commit with command: pnpm exec lint-staged
[12:39:06.129] [INFO] Successfully set all git hooks
[12:39:06.142] Done in 25.3s
[12:39:06.172] Detected Next.js version: 14.2.3
[12:39:06.226] Running "pnpm run build"
[12:39:06.708]  WARN  This project is configured to use v9.1.2 of pnpm. Your current pnpm is v9.1.4
[12:39:06.715] 
[12:39:06.715] > Shiro@1.1.3 prebuild /vercel/path0
[12:39:06.715] > rimraf .next || exit 0
[12:39:06.715] 
[12:39:06.816] 
[12:39:06.816] > Shiro@1.1.3 build /vercel/path0
[12:39:06.816] > cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 next build
[12:39:06.816] 
[12:39:07.546] VERCEL_GIT_PROVIDER github Shiro xgenya
[12:39:07.565] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[12:39:07.566] This information is used to shape Next.js' roadmap and prioritize features.
[12:39:07.566] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[12:39:07.566] https://nextjs.org/telemetry
[12:39:07.567] 
[12:39:07.569] (node:310) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
[12:39:07.569] (Use `node --trace-warnings ...` to show where the warning was created)
[12:39:07.637]   ▲ Next.js 14.2.3
[12:39:07.638]   - Environments: .env
[12:39:07.639]   - Experiments (use with caution):
[12:39:07.639]     · webpackBuildWorker
[12:39:07.639] 
[12:39:07.715]    Creating an optimized production build ...
[12:39:08.284] (node:328) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
[12:39:08.289] (Use `node --trace-warnings ...` to show where the warning was created)
[12:39:08.290] VERCEL_GIT_PROVIDER github Shiro xgenya
[12:40:07.405] (node:584) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
[12:40:07.406] (Use `node --trace-warnings ...` to show where the warning was created)
[12:40:07.429] VERCEL_GIT_PROVIDER github Shiro xgenya
[12:40:14.812] (node:633) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
[12:40:14.813] (Use `node --trace-warnings ...` to show where the warning was created)
[12:40:14.820] VERCEL_GIT_PROVIDER github Shiro xgenya
[12:41:12.047]  ✓ Compiled successfully
[12:41:12.049]    Linting and checking validity of types ...
[12:41:33.996] Failed to compile.
[12:41:33.997] 
[12:41:33.997] ./src/components/ui/markdown/parsers/katex.tsx:44:12
[12:41:33.997] Type error: Cannot find module 'katex' or its corresponding type declarations.
[12:41:33.997] 
[12:41:33.997]   42 |   useIsomorphicLayoutEffect(() => {
[12:41:33.997]   43 |     let isMounted = true
[12:41:33.997] > 44 |     import('katex').then((katex) => {
[12:41:33.997]      |            ^
[12:41:33.997]   45 |       if (!isMounted) return
[12:41:33.997]   46 |       // biome-ignore lint/correctness/noUnsafeOptionalChaining: <explanation>
[12:41:33.997]   47 |       const html = (katex?.default?.renderToString || katex?.renderToString)(
[12:41:34.060]  ELIFECYCLE  Command failed with exit code 1.
[12:41:34.080] Error: Command "pnpm run build" exited with 1
[12:41:34.816]

Used Package Manager

pnpm

Validations

Innei commented 3 months ago

Fixed in #375