installing react-bootstrap straightforward;

"npm install react-bootstrap --save"


"npm install @types/react-bootstrap --save"

then add references

import FooButton from 'react-bootstrap/lib/Button';

    return (
      <FooButton bsStyle="success" bsSize="small" >
           Nice Button

there is no error detection by typescript compiler but when I run gulp serve here its runtime exception; enter image description here

How can I fix and use react-bootstrap?

Edited: "npm view es version" output is 0.5.2 they say react-bootstrap version is es6, is it cause the error? doesn't make sense but can't figure the solution out

1 Answer 1


Use import * as FooButton from 'react-bootstrap/lib/Button'; to import the react-bootstrap Button component. It should render as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.