0
votes

I installed the https://github.com/yuanyan/boron library, but I have error:

TypeError: Cannot read property 'string' of undefined

TypeError: Cannot read property 'string' of undefined push../node_modules/boron/modalFactory.js.module.exports C:/Users/m/Desktop/chrome-extension/node_modules/boron/modalFactory.js:10 7 | module.exports = function (animation) { 8 | return React.createClass({ 9 | propTypes: {

10 | className: React.PropTypes.string, 11 | // Close the modal when esc is pressed? Defaults to true. 12 |
keyboard: React.PropTypes.bool, 13 | onShow: React.PropTypes.func,

2

2 Answers

0
votes

It looks like boron has a dependency of prop-types. Adding it via npm should resolve the issue:

npm install --save prop-types

0
votes

I have the same issue. The error is related to prop-types being externalized but npm install --save prop-types won't fix it entirely.

I found this forked repo which has updated boron as reboron to React 15+ https://github.com/bold-commerce/reboron which fixes the issue and gets rid of the error for me. You'll have to update your import statements at the very least.