Giter VIP home page Giter VIP logo

Comments (4)

stevoland avatar stevoland commented on April 27, 2024

Hi, it seems you're not using the CJS version but the AMD version that's published to bower. If you want to use browserify bundling you'll have to require both react and react-bootstrap with npm.

We use browserify to run our tests so it should work.

from react-bootstrap.

pieterv avatar pieterv commented on April 27, 2024

Hey @kastork, like @stevoland said the version of react-bootstrap published to bower is targeted to support AMD, with the version on NPM targeted at CJS, this is why you are getting errors with browserify.

If you can't switch to npm you can target the npm (so CJS compatible) version hosted on github with bower. If you change your react-bootstrap definition in your bower.json file to the below it should work:

{
  ...
  "dependencies": {
    ...
    "react-bootstrap": "react-bootstrap/react-bootstrap-npm#~0.10.2"
  }
}

from react-bootstrap.

kastork avatar kastork commented on April 27, 2024

Thanks guys, both solutions work in my little example, which I've updated to reflect the npm based solution.

from react-bootstrap.

pieterv avatar pieterv commented on April 27, 2024

Awesome, glad it worked! Also thanks for the really clear example code, sure makes it easier to debug :)

from react-bootstrap.

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.