facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
56.72k stars 8.54k forks source link

Build issue when i connect application with firebase. #3079

Closed krishnaUIDev closed 4 years ago

krishnaUIDev commented 4 years ago

Connected application with firebase. In the local env it's working fine. But when I do npm run build i am facing below error.

ReferenceError: IDBIndex is not defined (undefined) ReferenceError: IDBIndex is not defined at Module.<anonymous> (main:53625:38) at __webpack_require__ (main:21:30) at Promise.resolve.then (main:84540:4202) Error: Failed to compile with errors. at compiler.run (G:\krishnaUIDev.github.io\node_modules\@docusaurus\core\lib\commands\build.js:38:24) at finalCallback (G:\krishnaUIDev.github.io\node_modules\webpack\lib\MultiCompiler.js:254:12) at runWithDependencies.err (G:\krishnaUIDev.github.io\node_modules\webpack\lib\MultiCompiler.js:277:6) at done (G:\krishnaUIDev.github.io\node_modules\neo-async\async.js:2931:13) at runCompilers (G:\krishnaUIDev.github.io\node_modules\webpack\lib\MultiCompiler.js:181:48) at err (G:\krishnaUIDev.github.io\node_modules\webpack\lib\MultiCompiler.js:188:7) at compiler.run (G:\krishnaUIDev.github.io\node_modules\webpack\lib\MultiCompiler.js:270:7) at finalCallback (G:\krishnaUIDev.github.io\node_modules\webpack\lib\Compiler.js:257:39) at hooks.done.callAsync.err (G:\krishnaUIDev.github.io\node_modules\webpack\lib\Compiler.js:273:13) at AsyncSeriesHook.eval [as callAsync] (eval at create (G:\krishnaUIDev.github.io\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:42:1) at AsyncSeriesHook.lazyCompileHook (G:\krishnaUIDev.github.io\node_modules\tapable\lib\Hook.js:154:20) at onCompiled (G:\krishnaUIDev.github.io\node_modules\webpack\lib\Compiler.js:271:21) at hooks.afterCompile.callAsync.err (G:\krishnaUIDev.github.io\node_modules\webpack\lib\Compiler.js:681:15) at AsyncSeriesHook.eval [as callAsync] (eval at create (G:\krishnaUIDev.github.io\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at AsyncSeriesHook.lazyCompileHook (G:\krishnaUIDev.github.io\node_modules\tapable\lib\Hook.js:154:20) at compilation.seal.err (G:\krishnaUIDev.github.io\node_modules\webpack\lib\Compiler.js:678:31)

slorber commented 4 years ago

Hi, I'm sorry but we can only help you with such issue if you share your code with us.

It is very likely that you do something wrong in your own code that makes the server-side rendering fail at build time.

It is your responsability to integrate this project correctly with the rest of the tech stack. Maybe your code using Firebase should be browser-only? This is generally the case unless you use Firebase as a CMS and need to put the firebase content in the SSR output for SEO reasons.

See also: https://v2.docusaurus.io/docs/docusaurus-core/#browseronly