Giter VIP home page Giter VIP logo

Comments (3)

tajo avatar tajo commented on May 29, 2024

Not enough to reproduce. It should generally work with SSR (like here: https://baseweb.design/components/button/)

from react-view.

pranshuchittora avatar pranshuchittora commented on May 29, 2024

So I am using Docusaurus and while running the dev server it works without any issue given the above config. While building the prod build the clients gets successfully built but the server fails.
When I comment out the react-view code then it gets built successfully.

ERR Log
βœ” Client
  Compiled successfully in 1.27m

βœ– Server
Compiled with some errors in 1.42m

ReferenceError: Buffer is not defined
(undefined) ReferenceError: Buffer is not defined
at Object. (main:110171:18)
at webpack_require (main:21:30)
at Object. (main:185585:37)
at webpack_require (main:21:30)
at Object. (main:282495:14)
at webpack_require (main:21:30)
at Object. (main:281210:50)
at webpack_require (main:21:30)
at Object. (main:279113:39)
at webpack_require (main:21:30)
(undefined) ./node_modules/@babel/plugin-transform-react-display-name/node_modules/@babel/core/lib/config/files/plugins.js 165:11-24
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx-source/node_modules/@babel/core/lib/config/files/plugins.js 165:11-24
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-display-name/node_modules/@babel/core/lib/config/files/module-types.js 77:17-34
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-display-name/node_modules/@babel/core/lib/config/files/import.js 9:9-25
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx-source/node_modules/@babel/core/lib/config/files/module-types.js 77:17-34
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx-source/node_modules/@babel/core/lib/config/files/import.js 9:9-25
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/core/lib/config/files/plugins.js 165:11-24
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/core/lib/config/files/module-types.js 77:17-34
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx-self/node_modules/@babel/core/lib/config/files/plugins.js 165:11-24
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/core/lib/config/files/import.js 9:9-25
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx-self/node_modules/@babel/core/lib/config/files/module-types.js 77:17-34
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/plugin-transform-react-jsx-self/node_modules/@babel/core/lib/config/files/import.js 9:9-25
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/core/lib/config/files/plugins.js 165:11-24
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/core/lib/config/files/module-types.js 77:17-34
Critical dependency: the request of a dependency is an expression
(undefined) ./node_modules/@babel/core/lib/config/files/import.js 9:9-25
Critical dependency: the request of a dependency is an expression
Error: Failed to compile with errors.
at /home/undefined/OSS/rne/react-native-elements/website/node_modules/@docusaurus/core/lib/webpack/utils.js:145:24
at finalCallback (/home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/MultiCompiler.js:254:12)
at /home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/MultiCompiler.js:277:6
at done (/home/undefined/OSS/rne/react-native-elements/website/node_modules/neo-async/async.js:2931:13)
at runCompilers (/home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/MultiCompiler.js:181:48)
at /home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/MultiCompiler.js:188:7
at /home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/MultiCompiler.js:270:7
at finalCallback (/home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/Compiler.js:257:39)
at /home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/Compiler.js:273:13
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/undefined/OSS/rne/react-native-elements/website/node_modules/tapable/lib/HookCodeFactory.js:33:10), :40:1)
at AsyncSeriesHook.lazyCompileHook (/home/undefined/OSS/rne/react-native-elements/website/node_modules/tapable/lib/Hook.js:154:20)
at onCompiled (/home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/Compiler.js:271:21)
at /home/undefined/OSS/rne/react-native-elements/website/node_modules/webpack/lib/Compiler.js:681:15
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/undefined/OSS/rne/react-native-elements/website/node_modules/tapable/lib/HookCodeFactory.js:33:10), :4:1)
at AsyncSeriesHook.lazyCompileHook (/home/undefined/OSS/rne/react-native-elements/website/node_modules/tapable/lib/Hook.js:154:20)
at /home/undefined/OSS/rne/react-native-elements/website/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.

from react-view.

arpitBhalla avatar arpitBhalla commented on May 29, 2024

BrowserOnly API of docusaurus made it work,

 <BrowserOnly fallback={<>Loading...</>}>
        {() => <ButtonPlayground/>}
</BrowserOnly>

now RNE have integrated playground πŸŽ‰

from react-view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.