Closed mylonasg88 closed 2 years ago
Well there might be a lot of reasons but according to the error message : "Cannot read properties of null (reading 'useContext') at Object.useContext (react.development.js:1618:1)" it seams you are most likely missing a Provider and that is not related to this boilerplate or Rollup.
Can you share your repo to have a look at your code ?
I am writing a wrapper UI library on top of MUI (which is very classic these days I believe) and once I am including any components from the MaterialUI (MUI 5.x) I am getting these errors:
I am using boilerplate template as is and tier app is created with CRA v18.2. Add boilerplate app I use
npm add ../react-rollup-boilerplate
. Then in boilerplate app I install latest MUI and once I include a Button component from MUI in my custom component I get errors above.I also tried to add
external
array:But with no luck. An other fella has described exactly same issue here.