When trying to generate a build with rollup the above error is thrown:
isFragment is not exported by node_modules/react-is/index.js
It should build succesfully.
Build with rollup and you'll see the result..
| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.6.0 |
| React | v16.4.1 |
| Browser | chrome |
| TypeScript | mix |
| Material-UI Lab | v 4.0.0-alpha.34 |
Screenshot
This was fixed in the lastest version.
I have this fix in mind #18551
isFragment is exported in https://unpkg.com/browse/[email protected]/cjs/react-is.development.js, we should be fine.
This was fixed in the lastest version.
I upgraded to the latest material-ui/lab version but it did not fix it for me.
Update - it was in my rollup config..
I'm still running into this issue using material-ui core 4.8.3 and lab 4.0.0-alpha.39
[!] Error: 'isFragment' is not exported by node_modules/react-is/index.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
node_modules/@material-ui/core/esm/Tabs/Tabs.js (5:9)
3: import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4: import React from 'react';
5: import { isFragment } from 'react-is';
^
6: import PropTypes from 'prop-types';
7: import clsx from 'clsx';
@kevinvugts Is this a rollup problem? Suggestions on what to change? I've just started working with that, using the default config generated by create-react-library, so I'm not really sure how to fix it.
EDIT: Fixed by adding to the rollup commonjs section:
commonjs({
include: 'node_modules/**',
namedExports: {
'node_modules/react-is/index.js': ['isFragment', 'ForwardRef']
}
})
@kevinvugts what was wrong with your rollup config?
Most helpful comment
I'm still running into this issue using material-ui core 4.8.3 and lab 4.0.0-alpha.39
@kevinvugts Is this a rollup problem? Suggestions on what to change? I've just started working with that, using the default config generated by create-react-library, so I'm not really sure how to fix it.
EDIT: Fixed by adding to the rollup commonjs section: