Last active
June 17, 2020 01:03
-
-
Save johnwhitton/0280dfb25360d04bd309a8a05865c5f6 to your computer and use it in GitHub Desktop.
Window not defined when running redoc as an npm package with swagger-ui-react
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ohndesktop emasset $ yarn build | |
yarn run v1.22.4 | |
$ docusaurus build | |
Creating an optimized production build... | |
✔ Client | |
Compiled successfully in 20.75s | |
✖ Server | |
Compiled with some errors in 25.15s | |
ReferenceError: Buffer is not definedReferenceError: window is not defined | |
(undefined) ReferenceError: Buffer is not defined | |
at Object.<anonymous> (main:21287:20) | |
at __webpack_require__ (main:21:30) | |
at Object.<anonymous> (main:38412:26) | |
at __webpack_require__ (main:21:30) | |
at Object.<anonymous> (main:126774:30) | |
at __webpack_require__ (main:21:30) | |
at Object.<anonymous> (main:49945:18) | |
at __webpack_require__ (main:46685:30) | |
at Object.<anonymous> (main:49716:14) | |
at Object.<anonymous> (main:49939:30) | |
(undefined) ReferenceError: window is not defined | |
at Object.<anonymous> (main:76652:52) | |
at __webpack_require__ (main:21:30) | |
at Object.<anonymous> (main:46529:41) | |
at __webpack_require__ (main:21:30) | |
at Module.<anonymous> (main:32413:74) | |
at __webpack_require__ (main:21:30) | |
at main:138672:6854 | |
at runNextTicks (internal/process/task_queues.js:62:5) | |
at processTimers (internal/timers.js:489:9) | |
Error: Failed to compile with errors. | |
at /home/ec2-user/tmp/emasset/node_modules/@docusaurus/core/lib/commands/build.js:38:24 | |
at finalCallback (/home/ec2-user/tmp/emasset/node_modules/webpack/lib/MultiCompiler.js:254:12) | |
at /home/ec2-user/tmp/emasset/node_modules/webpack/lib/MultiCompiler.js:277:6 | |
at done (/home/ec2-user/tmp/emasset/node_modules/neo-async/async.js:2931:13) | |
at runCompilers (/home/ec2-user/tmp/emasset/node_modules/webpack/lib/MultiCompiler.js:181:48) | |
at /home/ec2-user/tmp/emasset/node_modules/webpack/lib/MultiCompiler.js:188:7 | |
at /home/ec2-user/tmp/emasset/node_modules/webpack/lib/MultiCompiler.js:270:7 | |
at finalCallback (/home/ec2-user/tmp/emasset/node_modules/webpack/lib/Compiler.js:257:39) | |
at /home/ec2-user/tmp/emasset/node_modules/webpack/lib/Compiler.js:273:13 | |
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/ec2-user/tmp/emasset/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:42:1) | |
at AsyncSeriesHook.lazyCompileHook (/home/ec2-user/tmp/emasset/node_modules/tapable/lib/Hook.js:154:20) | |
at onCompiled (/home/ec2-user/tmp/emasset/node_modules/webpack/lib/Compiler.js:271:21) | |
at /home/ec2-user/tmp/emasset/node_modules/webpack/lib/Compiler.js:681:15 | |
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/ec2-user/tmp/emasset/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1) | |
at AsyncSeriesHook.lazyCompileHook (/home/ec2-user/tmp/emasset/node_modules/tapable/lib/Hook.js:154:20) | |
at /home/ec2-user/tmp/emasset/node_modules/webpack/lib/Compiler.js:678:31 | |
error Command failed with exit code 1. | |
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment