isFragment is not exported by node_modules/react-is/index.js

See original GitHub issue
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When trying to generate a build with rollup the above error is thrown:

isFragment is not exported by node_modules/react-is/index.js

Expected Behavior 🤔

It should build succesfully.

Steps to Reproduce 🕹

Build with rollup and you’ll see the result…

Your Environment 🌎

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

Screenshot 2019-12-11 at 16 54 53

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
chirhoteccommented, Jan 14, 2020

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']
      }
    })
3reactions
hakunincommented, Nov 27, 2021

commonjs

This is still an issue, can https://github.com/react-component/util/issues/105 be looked at / merged?

Read more comments on GitHub >

github_iconTop Results From Across the Web

isFragment is not exported by node_modules/react-is/index.js
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >
reactjs - Rollup Error: 'isValidElementType' is not exported by ...
I have this problem when build: Error: 'typeOf' is not exported by ../../node_modules/react-is/index.js, imported by ../.
Read more >
nrwl-nx/community - Gitter
I'm using nx with a publishable React library. ... but if fails with the message Error: 'ForwardRef' is not exported by node_modules\react-is\index.js ....
Read more >
react-is - npm
Start using react-is in your project by running `npm i react-is`. There are 2421 other projects in the npm registry using react-is.
Read more >
rc-util@3.1.2 - Common Utils For React Component
guid:function. return string represent a global unique id across current application. createChainedFunction:function. Dom.addEventListener:function.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found