After updating from MUI v1.4.0 to v1.4.1, I get this error when building my project:
[exec]
[exec] ERROR in [at-loader] ./node_modules/@material-ui/core/Popper/Popper.d.ts:2:10
[exec] TS2305: Module ''popper.js'' has no exported member 'ReferenceObject'.
[exec]
[exec] ERROR in [at-loader] ./node_modules/react-popper/typings/react-popper.d.ts:29:23
[exec] TS2694: Namespace ''popper.js'' has no exported member 'Placement'.
[exec]
[exec] ERROR in [at-loader] ./node_modules/react-popper/typings/react-popper.d.ts:39:24
[exec] TS2694: Namespace ''popper.js'' has no exported member 'Modifiers'.
[exec]
[exec] ERROR in [at-loader] ./node_modules/react-popper/typings/react-popper.d.ts:40:24
[exec] TS2694: Namespace ''popper.js'' has no exported member 'Placement'.
[exec]
[exec] ERROR in [at-loader] ./node_modules/react-popper/typings/react-popper.d.ts:42:31
[exec] TS2694: Namespace ''popper.js'' has no exported member 'ReferenceObject'.
I checked and popper.js actually doesn't have those. Although, I'm not sure if they have to be explicitly available in popper.js.
Since I am not too familiar with this, I'm not sure if I made an obvious mistake or not. I tested going back to 1.4.0, and it works fine. I checked and there were a few changes to Popper.js in v1.4.1, but nothing that required changes on my part, so I wasn't sure if I had to change anything, but I didn't, except for the MUI version itself.
In case it's relevant and potentially the cause of my problem, my project has those two dependencies:
"popper.js": "1.12.9",
"react-popper": "1.0.0",
| Tech | Version |
|--------------|---------|
| Material-UI | v1.4.1 |
| React | v16.3.0 |
| browser | Chrome |
@Tuaniwan What version of popper.js have you installed in your node_modules?
Oh ok. We need to increase the popper.js dependency, we can't use [email protected].
https://github.com/mui-org/material-ui/blob/4eb6628e5be27a6c140c774069ea794d091c48c3/packages/material-ui/package.json#L57
ReferenceObject export was added in [email protected] if I'm not mistaken.
@oliviertassinari If ReferenceObject export was added in [email protected], do you mean we can't use the specific version [email protected] only or anything after that too?
You can, but the package will be duplicated in your bundle.
@Tuaniwan Do you want to increase the minimal required version of popper.js on our package.json?
Sure, as soon as I am off of work, [email protected] as minimal required version sounds good?