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

[BUG] Build fails #176

Closed
turbolent opened this issue Nov 28, 2024 · 0 comments · Fixed by #177
Closed

[BUG] Build fails #176

turbolent opened this issue Nov 28, 2024 · 0 comments · Fixed by #177

Comments

@turbolent
Copy link
Member

Current Behavior

Building current HEAD fails:

[16:20:24.201] Error: Docusaurus server-side rendering could not render static page with path / because of error: document is not defined
[16:20:24.202] It looks like you are using code that should run on the client-side only.
[16:20:24.202] To get around it, try using `<BrowserOnly>` (https://docusaurus.io/docs/docusaurus-core/#browseronly) or `ExecutionEnvironment` (https://docusaurus.io/docs/docusaurus-core/#executionenvironment).
[16:20:24.202] It might also require to wrap your client code in `useEffect` hook and/or import a third-party library dynamically (if any).
[16:20:24.202]     at serverEntry_render (main:589181:358)
[16:20:24.202]     at async /vercel/path0/node_modules/p-map/index.js:57:22 {
[16:20:24.202]   [cause]: ReferenceError: document is not defined
[16:20:24.202]       at createTag (main:636129:5)
[16:20:24.202]       at main:637415:20
[16:20:24.202]       at main:637422:6
[16:20:24.202]       at main:637639:4
[16:20:24.202]       at main:636102:28
[16:20:24.202]       at 49891 (main:636104:3)
[16:20:24.202]       at __webpack_require__ (main:703852:42)
[16:20:24.202]       at 46748 (main:596180:14)
[16:20:24.202]       at __webpack_require__ (main:703852:42)
[16:20:24.202]       at main:550538:22983
[16:20:24.202] }
[16:20:25.290] [success] [webpackbar] Server: Compiled with some errors in 1.09m
[16:20:25.370] 
[16:20:25.371] Error: Unable to build website for locale en.
[16:20:25.371]     at tryToBuildLocale (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:55:19)
[16:20:25.371]     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[16:20:25.371]     at async mapAsyncSequential (/vercel/path0/node_modules/@docusaurus/utils/lib/jsUtils.js:44:24)
[16:20:25.371]     at async Command.build (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:82:21) {
[16:20:25.371]   [cause]: Error: Failed to compile due to Webpack errors.
[16:20:25.371]   Error: Docusaurus server-side rendering could not render static page with path / because of error: document is not defined
[16:20:25.371]   It looks like you are using code that should run on the client-side only.
[16:20:25.371]   To get around it, try using `<BrowserOnly>` (https://docusaurus.io/docs/docusaurus-core/#browseronly) or `ExecutionEnvironment` (https://docusaurus.io/docs/docusaurus-core/#executionenvironment).
[16:20:25.371]   It might also require to wrap your client code in `useEffect` hook and/or import a third-party library dynamically (if any).
[16:20:25.371]       at /vercel/path0/node_modules/@docusaurus/core/lib/webpack/utils.js:207:24
[16:20:25.371]       at /vercel/path0/node_modules/webpack/lib/MultiCompiler.js:629:14
[16:20:25.371]       at processQueueWorker (/vercel/path0/node_modules/webpack/lib/MultiCompiler.js:566:6)
[16:20:25.371]       at process.processTicksAndRejections (node:internal/process/task_queues:85:11)
[16:20:25.372] }
[16:20:25.372] 
[16:20:25.372] [INFO] Docusaurus version: 3.0.0
[16:20:25.372] Node version: v22.11.0
[16:20:25.476] Error: Command "npm run build" exited with 1

Cause seems to be airbnb/lottie-web#2739. Tried to fix, but no luck

Expected Behavior

Build succeeds

Steps To Reproduce

npm i, npm run build

Environment

- OS: any?
- Node: v22.11.0
- npm: ?

What are you currently working on that this is blocking?

No response

This was referenced Nov 28, 2024
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

Successfully merging a pull request may close this issue.

1 participant