Innei / Shiro

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

使用vercel搭建时出现报错 #95

Closed beiyaohhhc closed 1 year ago

beiyaohhhc commented 1 year ago

Describe the bug

使用vercel按照教程正常部署时出错 显示 Build Failed Command "pnpm run build" exited with 1 以下是日志

[18:34:50] Running build in Washington, D.C., USA (East) – iad1 (Hive)
[18:34:50] Cloning github.com/beiyaohhhc/Shiro (Branch: main, Commit: 0ef398f)
[18:34:50] Skipping build cache, deployment was triggered without cache.
[18:34:51] Cloning completed: 613.707ms
[18:34:51] Running "vercel build"
[18:34:51] Vercel CLI 32.3.1
[18:34:52] 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
[18:34:52] Detected `pnpm-lock.yaml` version 6 generated by pnpm 8
[18:34:52] Installing dependencies...
[18:34:53] Lockfile is up to date, resolution step is skipped
[18:34:53] Progress: resolved 1, reused 0, downloaded 0, added 0
[18:34:53] Packages: +852
[18:34:53] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[18:34:54] Progress: resolved 852, reused 0, downloaded 45, added 33
[18:34:55] Progress: resolved 852, reused 0, downloaded 133, added 123
[18:34:56] Progress: resolved 852, reused 0, downloaded 164, added 150
[18:34:57] Progress: resolved 852, reused 0, downloaded 190, added 176
[18:34:58] Progress: resolved 852, reused 0, downloaded 283, added 274
[18:34:59] Progress: resolved 852, reused 0, downloaded 401, added 395
[18:35:00] Progress: resolved 852, reused 0, downloaded 496, added 482
[18:35:01] Progress: resolved 852, reused 0, downloaded 678, added 677
[18:35:02] Progress: resolved 852, reused 0, downloaded 852, added 852, done
[18:35:03] .../node_modules/simple-git-hooks postinstall$ node ./postinstall.js
[18:35:03] .../node_modules/bufferutil install$ node-gyp-build
[18:35:03] .../node_modules/utf-8-validate install$ node-gyp-build
[18:35:03] .../node_modules/simple-git-hooks postinstall: [INFO] Successfully set the pre-commit with command: pnpm exec lint-staged
[18:35:03] .../node_modules/simple-git-hooks postinstall: Done
[18:35:03] .../node_modules/utf-8-validate install: Done
[18:35:03] .../node_modules/bufferutil install: Done
[18:35:03] .../esbuild@0.17.11/node_modules/esbuild postinstall$ node install.js
[18:35:03] .../esbuild@0.17.11/node_modules/esbuild postinstall: Done
[18:35:03] 
[18:35:03] dependencies:
[18:35:03] + @clerk/nextjs 4.24.1
[18:35:03] + @floating-ui/react-dom 2.0.2
[18:35:03] + @mx-space/api-client 1.5.1
[18:35:03] + @radix-ui/react-dialog 1.0.4
[18:35:03] + @radix-ui/react-select 1.2.2
[18:35:03] + @tanstack/react-query 4.35.3
[18:35:03] + @tanstack/react-query-devtools 4.35.3
[18:35:03] + @tanstack/react-query-persist-client 4.35.5
[18:35:03] + @upstash/redis 1.22.0
[18:35:03] + @vercel/analytics 1.0.2
[18:35:03] + @vercel/postgres 0.5.0
[18:35:03] + axios 1.5.0
[18:35:03] + clsx 2.0.0
[18:35:03] + daisyui 3.7.7
[18:35:03] + dayjs 1.11.10
[18:35:03] + emoji-mart 5.5.2
[18:35:03] + emoji-picker-react 4.5.2
[18:35:03] + foxact 0.2.20
[18:35:03] + framer-motion 10.16.4
[18:35:03] + idb-keyval 6.2.1
[18:35:03] + immer 10.0.2
[18:35:03] + jojoo 0.0.8
[18:35:03] + jotai 2.4.2
[18:35:03] + js-cookie 3.0.5
[18:35:03] + markdown-to-jsx <- @innei/markdown-to-jsx 7.2.1-beta.0
[18:35:03] + medium-zoom 1.0.8
[18:35:03] + mermaid 10.4.0
[18:35:03] + next 13.5.2
[18:35:03] + next-themes 0.2.1
[18:35:03] + openai 4.10.0
[18:35:03] + qrcode.react 3.1.0
[18:35:03] + react 18.2.0
[18:35:03] + react-dom 18.2.0
[18:35:03] + react-error-boundary 4.0.11
[18:35:03] + react-intersection-observer 9.5.2
[18:35:03] + react-toastify 9.1.3
[18:35:03] + react-tweet 3.1.1
[18:35:03] + react-wrap-balancer 1.1.0
[18:35:03] + remove-markdown 0.5.0
[18:35:03] + socket.io-client 4.7.2
[18:35:03] + tailwind-merge 1.14.0
[18:35:03] + uniqolor 1.1.0
[18:35:03] + xss 1.0.14
[18:35:03] 
[18:35:03] devDependencies:
[18:35:03] + @iconify-json/material-symbols 1.1.59
[18:35:03] + @iconify-json/mingcute 1.1.10
[18:35:03] + @iconify/tailwind 0.1.3
[18:35:03] + @innei/eslint-config-react-ts 0.11.1
[18:35:03] + @innei/prettier 0.11.1
[18:35:03] + @next/bundle-analyzer 13.5.2
[18:35:03] + @tailwindcss/typography 0.5.10
[18:35:03] + @types/js-cookie 3.0.4
[18:35:03] + @types/markdown-escape 1.1.0
[18:35:03] + @types/node 20.6.3
[18:35:03] + @types/react 18.2.22
[18:35:03] + @types/react-dom 18.2.7
[18:35:03] + @types/remove-markdown 0.3.1
[18:35:03] + autoprefixer 10.4.16
[18:35:03] + cross-env 7.0.3
[18:35:03] + dotenv 16.3.1
[18:35:03] + eslint 8.50.0
[18:35:03] + husky 8.0.3
[18:35:03] + lint-staged 14.0.1
[18:35:03] + postcss 8.4.30
[18:35:03] + postcss-import 15.1.0
[18:35:03] + postcss-nested 6.0.1
[18:35:03] + postcss-preset-env 9.1.4
[18:35:03] + postcss-prune-var 1.1.1
[18:35:03] + prettier 3.0.3
[18:35:03] + rimraf 5.0.1
[18:35:03] + simple-git-hooks 2.9.0
[18:35:03] + tailwind-scrollbar 3.0.5
[18:35:03] + tailwind-variants 0.1.14
[18:35:03] + tailwindcss 3.3.3
[18:35:03] + typescript 5.2.2
[18:35:03] + typewind 0.1.3
[18:35:03] + zx 7.2.3
[18:35:03] 
[18:35:03] 
[18:35:03] > Shiro@0.2.0 prepare /vercel/path0
[18:35:03] > pnpm exec simple-git-hooks && test -f .env || cp .env.template .env
[18:35:03] 
[18:35:04] [INFO] Successfully set the pre-commit with command: pnpm exec lint-staged
[18:35:04] [INFO] Successfully set all git hooks
[18:35:04] Done in 11.3s
[18:35:04] Running "pnpm run build"
[18:35:04] 
[18:35:04] > Shiro@0.2.0 build /vercel/path0
[18:35:04] > cross-env NODE_ENV=production next build
[18:35:04] 
[18:35:05] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[18:35:05] This information is used to shape Next.js' roadmap and prioritize features.
[18:35:05] 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:
[18:35:05] https://nextjs.org/telemetry
[18:35:05] 
[18:35:05]    Creating an optimized production build...
[18:35:10] 
[18:35:10] warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.
[18:35:10] warn - Update your configuration file to silence this warning.
[18:35:10] 
[18:35:10] warn - As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`.
[18:35:10] warn - Update your configuration file to silence this warning.
[18:35:10] 
[18:35:10] warn - As of Tailwind CSS v3.0, `trueGray` has been renamed to `neutral`.
[18:35:10] warn - Update your configuration file to silence this warning.
[18:35:10] 
[18:35:10] warn - As of Tailwind CSS v3.0, `coolGray` has been renamed to `gray`.
[18:35:10] warn - Update your configuration file to silence this warning.
[18:35:10] 
[18:35:10] warn - As of Tailwind CSS v3.0, `blueGray` has been renamed to `slate`.
[18:35:10] warn - Update your configuration file to silence this warning.
[18:35:10] 
[18:35:10] 🌼 daisyUI 3.7.7 https://daisyui.com
[18:35:10] ╰╮
[18:35:10]  ╰─ ✔︎ [ 2 ] themes are enabled. You can add more themes or make your own theme:
[18:35:10]       https://daisyui.com/docs/themes
[18:35:10] 
[18:35:10]     ❤︎ Support daisyUI: https://opencollective.com/daisyui
[18:35:10] 
[18:35:59] 
[18:35:59] 🌼 daisyUI 3.7.7 https://daisyui.com
[18:36:00] ╰╮
[18:36:00]  ╰─ ✔︎ [ 2 ] themes are enabled. You can add more themes or make your own theme:
[18:36:00]       https://daisyui.com/docs/themes
[18:36:00] 
[18:36:00]     ❤︎ Support daisyUI: https://opencollective.com/daisyui
[18:36:00] 
[18:36:24]  ⚠ Compiled with warnings
[18:36:24] 
[18:36:24] ./node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.js
[18:36:24] Module not found: Can't resolve 'encoding' in '/vercel/path0/node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib'
[18:36:24] 
[18:36:24] Import trace for requested module:
[18:36:24] ./node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.js
[18:36:24] ./node_modules/.pnpm/openai@4.10.0/node_modules/openai/_shims/node-runtime.mjs
[18:36:24] ./node_modules/.pnpm/openai@4.10.0/node_modules/openai/_shims/auto/runtime-node.mjs
[18:36:24] ./node_modules/.pnpm/openai@4.10.0/node_modules/openai/_shims/index.mjs
[18:36:24] ./node_modules/.pnpm/openai@4.10.0/node_modules/openai/uploads.mjs
[18:36:24] ./node_modules/.pnpm/openai@4.10.0/node_modules/openai/index.mjs
[18:36:24] ./src/app/api/ai/summary/route.ts
[18:36:24] 
[18:36:24]    Linting and checking validity of types...
[18:36:26] 
[18:36:26]  ⚠ The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/basic-features/eslint#migrating-existing-config
[18:36:26] Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration .
[18:36:36] 
[18:36:36] ./src/app/(page-detail)/[slug]/pageExtra.tsx
[18:36:36] 94:6  Warning: React Hook useEffect has a missing dependency: 'setHeaderMetaInfo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/app/404.tsx
[18:36:36] 3:16  Warning: Component definition is missing display name  react/display-name
[18:36:36] 
[18:36:36] ./src/app/friends/page.tsx
[18:36:36] 382:6  Warning: React Hook useCallback has a missing dependency: 'setValue'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 393:5  Warning: React Hook useCallback has a missing dependency: 'dismissTop'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/app/notes/[id]/pageExtra.tsx
[18:36:36] 126:6  Warning: React Hook useEffect has a missing dependency: 'setHeaderMetaInfo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/app/notes/redirect.tsx
[18:36:36] 18:6  Warning: React Hook useLayoutEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/app/posts/(post-detail)/[category]/[slug]/pageExtra.tsx
[18:36:36] 73:6  Warning: React Hook useEffect has a missing dependency: 'setHeaderMetaInfo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/app/projects/[id]/page.tsx
[18:36:36] 27:6  Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/app/thinking/page.tsx
[18:36:36] 184:6  Warning: React Hook useEffect has missing dependencies: 'animate' and 'getPrevData'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/app/timeline/page.tsx
[18:36:36] 105:6  Warning: React Hook useEffect has a missing dependency: 'refetch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/atoms/viewport.ts
[18:36:36] 43:55  Warning: React Hook useCallback has a missing dependency: 'selector'. Either include it or remove the dependency array. If 'selector' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/layout/header/hooks.ts
[18:36:36] 17:6  Warning: React Hook useEffect has a missing dependency: 'setter'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/float-popover/FloatPopover.tsx
[18:36:36] 56:5  Warning: 'animate' is assigned a value but never used. Allowed unused vars must match /^_/u.  unused-imports/no-unused-vars
[18:36:36] 144:6  Warning: React Hook useEffect has missing dependencies: 'refs.floating' and 'type'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/form/Form.tsx
[18:36:36] 107:5  Warning: React Hook useCallback has a missing dependency: 'fieldsAtom'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/form/FormInput.tsx
[18:36:36] 52:6  Warning: React Hook useEffect has missing dependencies: 'addField' and 'removeField'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/gallery/Gallery.tsx
[18:36:36] 188:6  Warning: Component definition is missing display name  react/display-name
[18:36:36] 
[18:36:36] ./src/components/ui/image/ZoomedImage.tsx
[18:36:36] 256:7  Warning: 'placeholder' is defined but never used. Allowed unused args must match /^_/u.  unused-imports/no-unused-vars
[18:36:36] 
[18:36:36] ./src/components/ui/link-card/LinkCard.tsx
[18:36:36] 59:5  Warning: React Hook useCallback has a missing dependency: 'peek'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/markdown/index.demo.tsx
[18:36:36] 19:29  Warning: 'output' is defined but never used. Allowed unused args must match /^_/u.  unused-imports/no-unused-vars
[18:36:36] 19:37  Warning: 'state' is defined but never used. Allowed unused args must match /^_/u.  unused-imports/no-unused-vars
[18:36:36] 
[18:36:36] ./src/components/ui/masonry/Masonry.tsx
[18:36:36] 43:6  Warning: React Hook useEffect has a missing dependency: 'Component'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/number-transition/CountUp.tsx
[18:36:36] 22:6  Warning: React Hook useEffect has a missing dependency: 'initialNumberRef'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/text/FlexText.tsx
[18:36:36] 31:6  Warning: React Hook useEffect has a missing dependency: 'props.text.length'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/transition/IconTransiton.tsx
[18:36:36] 31:6  Warning: React Hook useEffect has missing dependencies: 'controls' and 'map'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/ui/transition/factor.tsx
[18:36:36] 54:11  Warning: React Hook useMemo has a missing dependency: 'lcpOptimization'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/comment/CommentBox/AuthedInput.tsx
[18:36:36] 26:6  Warning: React Hook useEffect has a missing dependency: 'setter'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/comment/CommentBox/UniversalTextArea.tsx
[18:36:36] 46:6  Warning: React Hook useCallback has a missing dependency: 'setter'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/note/NoteMainContainer.tsx
[18:36:36] 28:6  Warning: React Hook useEffect has a missing dependency: 'setHeight'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/post/PostPinIcon.tsx
[18:36:36] 9:28  Warning: Component definition is missing display name  react/display-name
[18:36:36] 
[18:36:36] ./src/components/widgets/post/fab/PostTagsFAB.tsx
[18:36:36] 47:6  Warning: React Hook useCallback has a missing dependency: 'present'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/post/fab/PostsSortingFab.tsx
[18:36:36] 107:16  Warning: React Hook useCallback has missing dependencies: 'handleChange' and 'setSortBy'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 125:16  Warning: React Hook useCallback has missing dependencies: 'handleChange' and 'setOrderBy'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/shared/SearchFAB.tsx
[18:36:36] 170:10  Warning: React Hook useCallback has a missing dependency: 'setCurrentSelect'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 214:5  Warning: React Hook useCallback has a missing dependency: 'setCurrentSelect'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/subscribe/SubscribeModal.tsx
[18:36:36] 84:6  Warning: React Hook useEffect has missing dependencies: 'defaultTypes', 'dispatch', and 'stateRef'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/timeline/TimelineProgress.tsx
[18:36:36] 45:6  Warning: React Hook useEffect has a missing dependency: 'updatePercent'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/toc/TocAside.tsx
[18:36:36] 55:8  Warning: React Hook useEffect has a missing dependency: 'forceUpdate'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 71:8  Warning: React Hook useMemo has an unnecessary dependency: 'updated'. Either exclude it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/toc/TocFAB.tsx
[18:36:36] 42:6  Warning: React Hook useCallback has a missing dependency: 'present'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/toc/TocItem.tsx
[18:36:36] 45:6  Warning: React Hook useEffect has a missing dependency: 'active'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/components/widgets/toc/TocTree.tsx
[18:36:36] 50:6  Warning: React Hook useEffect has a missing dependency: 'setActiveId'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 122:5  Warning: React Hook useCallback has missing dependencies: 'onItemClick', 'scrollInNextTick', 'setActiveId', and 'tocRef'. Either include them or remove the dependency array. If 'onItemClick' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/hooks/common/use-single-double-click.ts
[18:36:36] 22:6  Warning: React Hook useEffect has a missing dependency: 'delay'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/lib/define-metadata.ts
[18:36:36] 25:53  Warning: 'err' is defined but never used. Allowed unused args must match /^_/u.  unused-imports/no-unused-vars
[18:36:36] 
[18:36:36] ./src/providers/article/MarkdownImageRecordProvider.tsx
[18:36:36] 18:6  Warning: React Hook useEffect has a missing dependency: 'atomRef'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/providers/note/CurrentNoteIdProvider.tsx
[18:36:36] 24:6  Warning: React Hook useEffect has a missing dependency: 'setNoteId'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/providers/root/aggregation-data-provider.tsx
[18:36:36] 72:9  Warning: React Hook useCallback was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies.  react-hooks/exhaustive-deps
[18:36:36] 72:9  Warning: React Hook useCallback has a missing dependency: 'selector'. Either include it or remove the dependency array. If 'selector' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
[18:36:36] 87:9  Warning: React Hook useCallback was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies.  react-hooks/exhaustive-deps
[18:36:36] 87:9  Warning: React Hook useCallback has a missing dependency: 'selector'. Either include it or remove the dependency array. If 'selector' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/providers/root/modal-stack-provider.tsx
[18:36:36] 156:6  Warning: React Hook useEffect has a missing dependency: 'animateController'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/providers/root/socket-provider.tsx
[18:36:36] 17:6  Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/providers/shared/LayoutRightSideProvider.tsx
[18:36:36] 19:6  Warning: React Hook useLayoutEffect has a missing dependency: 'setElement'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] ./src/providers/shared/WrappedElementProvider.tsx
[18:36:36] 126:6  Warning: React Hook useEffect has missing dependencies: 'getDir' and 'setter'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[18:36:36] 
[18:36:36] info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[18:36:41]    Collecting page data...
[18:36:42]  ⚠ Using edge runtime on a page currently disables static generation for that page
[18:37:03]    Generating static pages (0/20)...
[18:37:03] 
   Generating static pages (5/20)
[18:37:03] 
[18:37:03] 
[18:37:03] Error occurred prerendering page "/feed". Read more: https://nextjs.org/docs/messages/prerender-error
[18:37:03] SyntaxError: Unexpected token < in JSON at position 0
[18:37:03]     at JSON.parse (<anonymous>)
[18:37:03]     at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
[18:37:03]     at successSteps (node:internal/deps/undici/undici:6636:27)
[18:37:03]     at node:internal/deps/undici/undici:1236:60
[18:37:03]     at node:internal/process/task_queues:140:7
[18:37:03]     at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
[18:37:03]     at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
[18:37:03]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:37:03] 
[18:37:03] Error occurred prerendering page "/sitemap". Read more: https://nextjs.org/docs/messages/prerender-error
[18:37:03] SyntaxError: Unexpected token < in JSON at position 0
[18:37:03]     at JSON.parse (<anonymous>)
[18:37:03]     at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
[18:37:03]     at successSteps (node:internal/deps/undici/undici:6636:27)
[18:37:03]     at node:internal/deps/undici/undici:1236:60
[18:37:03]     at node:internal/process/task_queues:140:7
[18:37:03]     at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
[18:37:03]     at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
[18:37:03]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:37:04] 
   Generating static pages (10/20)
[18:37:04] 
[18:37:05] 
   Generating static pages (15/20)
[18:37:05] 
[18:37:06] 
 ✓ Generating static pages (20/20)
[18:37:06] 
[18:37:06] > Export encountered errors on following paths:
[18:37:06]  /feed/route: /feed
[18:37:06]  /sitemap/route: /sitemap
[18:37:06]  ELIFECYCLE  Command failed with exit code 1.
[18:37:06] Error: Command "pnpm run build" exited with 1

Reproduction

System Info

vercel

Used Package Manager

pnpm

Validations

CielNeko commented 1 year ago

看起来后端有点问题

CielNeko commented 1 year ago

你看看 {API_URL}/aggregate/feed 返回啥

beiyaohhhc commented 1 year ago

你看看 {API_URL}/aggregate/feed 返回啥

{ "ok": 0, "message": "Cannot GET /aggregate/feed" }

CielNeko commented 1 year ago

{ "ok": 0, "message": "Cannot GET /aggregate/feed" }

是 {API_URL} 不是 {BASE_URL} 类似这种 https://example.com/api/v2/aggregate/feed

beiyaohhhc commented 1 year ago

{ "ok": 0, "message": "Cannot GET /aggregate/feed" }

是 {API_URL} 不是 {BASE_URL} 类似这种 https://example.com/api/v2/aggregate/feed

直接404 但是管理后台还是正常的

CielNeko commented 1 year ago

{ "ok": 0, "message": "Cannot GET /aggregate/feed" }

是 {API_URL} 不是 {BASE_URL} 类似这种 https://example.com/api/v2/aggregate/feed

直接404 但是管理后台还是正常的

你 NEXT_PUBLIC_GATEWAY_URL 和 NEXT_PUBLIC_API_URL 填的都是啥

beiyaohhhc commented 1 year ago

跟后端设置一样 NEXT_PUBLIC_API_URL=https://app.beiyao.icu/api/v2 NEXT_PUBLIC_GATEWAY_URL=https://app.beiyao.icu/

beiyaohhhc commented 1 year ago

nginx错误日志

2023/09/29 09:54:09 [error] 23958#0: *1194733 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.71.210.197, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952449158 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 09:56:26 [error] 23958#0: *1194788 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggregate/feed" failed (2: No such file or directory), client: 172.71.214.64, server: app.beiyao.icu, request: "GET /api/v2/aggregate/feed HTTP/2.0", host: "app.beiyao.icu"
2023/09/29 09:56:53 [error] 23958#0: *1194797 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggregate/feed" failed (2: No such file or directory), client: 172.71.219.65, server: app.beiyao.icu, request: "GET /api/v2/aggregate/feed HTTP/2.0", host: "app.beiyao.icu"
2023/09/29 09:57:40 [error] 23958#0: *1194832 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggregate/feed" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2//aggregate/feed HTTP/2.0", host: "app.beiyao.icu"
2023/09/29 09:57:48 [error] 23958#0: *1194832 open() "/www/wwwroot/app.beiyao.icu/api/v2/master" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2/master?t=1695952668962 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 09:57:48 [error] 23958#0: *1194834 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952668971 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 09:58:02 [error] 23958#0: *1194834 open() "/www/wwwroot/app.beiyao.icu/api/v2/master" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2/master?t=1695952683249 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 09:58:02 [error] 23958#0: *1194832 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952683254 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 09:58:36 [error] 23958#0: *1194875 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggr" failed (2: No such file or directory), client: 162.158.166.118, server: app.beiyao.icu, request: "GET /api/v2/aggr HTTP/2.0", host: "app.beiyao.icu"
2023/09/29 09:58:38 [error] 23958#0: *1194876 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggre" failed (2: No such file or directory), client: 172.69.23.101, server: app.beiyao.icu, request: "GET /api/v2/aggre HTTP/2.0", host: "app.beiyao.icu"
2023/09/29 09:58:45 [error] 23958#0: *1194877 open() "/www/wwwroot/app.beiyao.icu/api/v2/master" failed (2: No such file or directory), client: 172.71.210.211, server: app.beiyao.icu, request: "GET /api/v2/master?t=1695952725940 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 09:58:45 [error] 23958#0: *1194879 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.71.210.211, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952725950 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 09:59:04 [error] 23958#0: *1194888 open() "/www/wwwroot/app.beiyao.icu/api/v2/master" failed (2: No such file or directory), client: 172.70.90.244, server: app.beiyao.icu, request: "GET /api/v2/master?t=1695952743049 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 09:59:04 [error] 23961#0: *1194889 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.70.90.244, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952743053 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin"
2023/09/29 10:06:46 [error] 23958#0: *1195050 open() "/www/wwwroot/app.beiyao.icu/api/v2" failed (2: No such file or directory), client: 172.71.210.46, server: app.beiyao.icu, request: "GET /api/v2 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://github.com/Innei/Shiro/issues/95"
CielNeko commented 1 year ago

你反代配炸了吧


From: Beiyao @.> Sent: Friday, September 29, 2023 10:14:19 AM To: Innei/Shiro @.> Cc: Asuka Miya @.>; Comment @.> Subject: Re: [Innei/Shiro] 使用vercel搭建时出现报错 (Issue #95)

nginx错误日志

2023/09/29 09:54:09 [error] 23958#0: 1194733 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.71.210.197, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952449158 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 09:56:26 [error] 23958#0: 1194788 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggregate/feed" failed (2: No such file or directory), client: 172.71.214.64, server: app.beiyao.icu, request: "GET /api/v2/aggregate/feed HTTP/2.0", host: "app.beiyao.icu" 2023/09/29 09:56:53 [error] 23958#0: 1194797 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggregate/feed" failed (2: No such file or directory), client: 172.71.219.65, server: app.beiyao.icu, request: "GET /api/v2/aggregate/feed HTTP/2.0", host: "app.beiyao.icu" 2023/09/29 09:57:40 [error] 23958#0: 1194832 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggregate/feed" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2//aggregate/feed HTTP/2.0", host: "app.beiyao.icu" 2023/09/29 09:57:48 [error] 23958#0: 1194832 open() "/www/wwwroot/app.beiyao.icu/api/v2/master" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2/master?t=1695952668962 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 09:57:48 [error] 23958#0: 1194834 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952668971 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 09:58:02 [error] 23958#0: 1194834 open() "/www/wwwroot/app.beiyao.icu/api/v2/master" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2/master?t=1695952683249 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 09:58:02 [error] 23958#0: 1194832 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.71.214.225, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952683254 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 09:58:36 [error] 23958#0: 1194875 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggr" failed (2: No such file or directory), client: 162.158.166.118, server: app.beiyao.icu, request: "GET /api/v2/aggr HTTP/2.0", host: "app.beiyao.icu" 2023/09/29 09:58:38 [error] 23958#0: 1194876 open() "/www/wwwroot/app.beiyao.icu/api/v2/aggre" failed (2: No such file or directory), client: 172.69.23.101, server: app.beiyao.icu, request: "GET /api/v2/aggre HTTP/2.0", host: "app.beiyao.icu" 2023/09/29 09:58:45 [error] 23958#0: 1194877 open() "/www/wwwroot/app.beiyao.icu/api/v2/master" failed (2: No such file or directory), client: 172.71.210.211, server: app.beiyao.icu, request: "GET /api/v2/master?t=1695952725940 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 09:58:45 [error] 23958#0: 1194879 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.71.210.211, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952725950 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 09:59:04 [error] 23958#0: 1194888 open() "/www/wwwroot/app.beiyao.icu/api/v2/master" failed (2: No such file or directory), client: 172.70.90.244, server: app.beiyao.icu, request: "GET /api/v2/master?t=1695952743049 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 09:59:04 [error] 23961#0: 1194889 open() "/www/wwwroot/app.beiyao.icu/api/v2/master/check_logged" failed (2: No such file or directory), client: 172.70.90.244, server: app.beiyao.icu, request: "GET /api/v2/master/check_logged?t=1695952743053 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://app.beiyao.icu/qaqdmin" 2023/09/29 10:06:46 [error] 23958#0: *1195050 open() "/www/wwwroot/app.beiyao.icu/api/v2" failed (2: No such file or directory), client: 172.71.210.46, server: app.beiyao.icu, request: "GET /api/v2 HTTP/2.0", host: "app.beiyao.icu", referrer: "https://github.com/Innei/Shiro/issues/95"

― Reply to this email directly, view it on GitHubhttps://github.com/Innei/Shiro/issues/95#issuecomment-1740221762, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQKIBDRNL4YSCQBKH72DP7TX4YVHXANCNFSM6AAAAAA5HRNDHQ. You are receiving this because you commented.Message ID: @.***>

CielNeko commented 1 year ago

你直接把 app.beiyao.icu 全反代到 127.0.0.1:2333 看看

beiyaohhhc commented 1 year ago
17:33:27  WARN   [AllExceptionsFilter]  IP: 163.123.192.45 错误信息:(404) Cannot OPTIONS /api/v2/links/all Path: /api/v2/links/all
17:33:27  WARN   [AllExceptionsFilter]  IP: 163.123.192.45 错误信息:(404) Cannot OPTIONS /api/v2/subscribe/status Path: /api/v2/subscribe/status
17:33:28  WARN   [AllExceptionsFilter]  IP: 163.123.192.45 错误信息:(404) Cannot OPTIONS /api/v2/links/all Path: /api/v2/links/all
17:33:28  WARN   [AllExceptionsFilter]  IP: 163.123.192.45 错误信息:(404) Cannot OPTIONS /api/v2/subscribe/status Path: /api/v2/subscribe/status
17:33:31  WARN   [AllExceptionsFilter]  IP: 163.123.192.45 错误信息:(404) Cannot OPTIONS /api/v2/links/all Path: /api/v2/links/all
17:33:31  WARN   [AllExceptionsFilter]  IP: 163.123.192.45 错误信息:(404) Cannot OPTIONS /api/v2/subscribe/status Path: /api/v2/subscribe/status
17:33:36  WARN   [AllExceptionsFilter]  IP: 163.123.192.45 错误信息:(404) Cannot OPTIONS /api/v2/subscribe/status Path: /api/v2/subscribe/status
17:33:37  WARN   [AllExceptionsFilter]  IP: 163.123.192.45 错误信息:(404) Cannot OPTIONS /api/v2/links/all Path: /api/v2/links/all

这个是访问前端时候后端的日志,但是我单独请求/api/v2/links/all就能有响应,在前端请求就不可以.

Innei commented 1 year ago

vercel 的环境变量错了吧

beiyaohhhc commented 1 year ago

好了 证实是配置问题

yhrwd commented 9 months ago

好了 证实是配置问题

你咋解决的,我也是这个问题