Code Monkey home page Code Monkey logo

Comments (8)

couds avatar couds commented on May 29, 2024

Weird, can you setup an example project where this is happening? or post the stacktrace? I'm using that version with SSR (Without Next.js) and its works.

Also I just check and the only reference to window on the project are inside the navbar and before using it there is a check that window exists

from react-bulma-components.

idrakimuhamad avatar idrakimuhamad commented on May 29, 2024

You can try https://github.com/idrakimuhamad/sample-bulma-next

I only loaded the Button component in this case. In this repo I didn't set any custom webpack config or next config.

ReferenceError: window is not defined
    at Object.<anonymous> (webpack://react-bulma-components/webpack/bootstrap:8:0)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
    at Module.require (module.js:606:17)
    at require (internal/module.js:11:18)
    at Object.react-bulma-components (webpack:/external "react-bulma-components":1:0)
    at __webpack_require__ (webpack:/webpack/bootstrap 69136624c0b9ffca3349:21:0)
    at Object../pages/index.js (/Users/idraki/Developments/sample-bulma-next/.next/server/bundles/pages/index.js:82:81)
    at __webpack_require__ (webpack:/webpack/bootstrap 69136624c0b9ffca3349:21:0)
    at Object.3 (/Users/idraki/Developments/sample-bulma-next/.next/server/bundles/pages/index.js:107:18)
    at __webpack_require__ (webpack:/webpack/bootstrap 69136624c0b9ffca3349:21:0)
    at module.exports../pages/index.js.Object.defineProperty.value (webpack:/webpack/bootstrap 69136624c0b9ffca3349:68:0)
    at Object.<anonymous> (/Users/idraki/Developments/sample-bulma-next/.next/server/bundles/pages/index.js:73:10)

Honestly, I don't know if its SSR related or more on Webpack configuration mishap, so if its not actually SSR I'd rename the title for better explaination.

from react-bulma-components.

couds avatar couds commented on May 29, 2024

Sorry I'm a little sick right now. I will try to check this during the weekend

from react-bulma-components.

idrakimuhamad avatar idrakimuhamad commented on May 29, 2024

No problem man. Get well soon.

from react-bulma-components.

couds avatar couds commented on May 29, 2024

@idrakimuhamad this issue didn't happen to you with the 1.4.5? I did some research and what changed was the webpack version. I will continue doing some test and try to fix this before the official release of the version 2.

Also if possible I recommend to you to use use the components directly import Columns from 'react-bulma-components/lib/components/columns' this will reduce the bundle size but will require some configuration on you webpack.

from react-bulma-components.

idrakimuhamad avatar idrakimuhamad commented on May 29, 2024

I'm using 1.5.0 right now and not having any problem like this.

from react-bulma-components.

couds avatar couds commented on May 29, 2024

Can you try the version 2.0.0-6 (should be fixed now)

from react-bulma-components.

idrakimuhamad avatar idrakimuhamad commented on May 29, 2024

Yay! Its working. Thanks man.

from react-bulma-components.

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.