Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法构建 #553

Open
ArisuSuzushima opened this issue Jul 19, 2023 · 0 comments
Open

无法构建 #553

ArisuSuzushima opened this issue Jul 19, 2023 · 0 comments

Comments

@ArisuSuzushima
Copy link

Gitalk 版本

报错信息?



- info Creating an optimized production build...
--
00:58:12.294 | - info Compiled successfully
00:58:12.299 | - info Collecting page data...
00:58:28.555 | - info Generating static pages (0/9)
00:58:28.711 | ReferenceError: window is not defined
00:58:28.712 | at new GitalkComponent (/vercel/path0/node_modules/gitalk/dist/gitalk-component.js:10019:11)
00:58:28.712 | at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:141)
00:58:28.712 | at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
00:58:28.712 | at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
00:58:28.712 | at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:145)
00:58:28.712 | at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
00:58:28.712 | at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
00:58:28.712 | at bd (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
00:58:28.712 | at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
00:58:28.713 | at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
00:58:28.713 |  
00:58:28.713 | Error occurred prerendering page "/comments". Read more: https://nextjs.org/docs/messages/prerender-error
00:58:28.713 | ReferenceError: window is not defined
00:58:28.713 | at new GitalkComponent (/vercel/path0/node_modules/gitalk/dist/gitalk-component.js:10019:11)
00:58:28.713 | at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:141)
00:58:28.713 | at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
00:58:28.713 | at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
00:58:28.713 | at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:145)
00:58:28.713 | at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
00:58:28.714 | at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
00:58:28.714 | at bd (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
00:58:28.714 | at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
00:58:28.714 | at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
00:58:28.714 | - info Generating static pages (2/9)
00:58:28.742 | - info Generating static pages (4/9)
00:58:28.783 | - info Generating static pages (6/9)
00:58:28.809 | - info Generating static pages (9/9)
00:58:28.812 |  
00:58:28.812 | > Export encountered errors on following paths:
00:58:28.812 | /comments
00:58:28.864 | error Command failed with exit code 1.
00:58:28.864 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
00:58:28.888 | Error: Command "yarn run build" exited with 1


浏览器版本?

chrome 114

复现步骤?

使用vercel部署

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant