Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 2 tasks
kevinvugts opened this issue Dec 11, 2019 · 7 comments
Closed
1 of 2 tasks

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

kevinvugts opened this issue Dec 11, 2019 · 7 comments
Labels
bug 馃悰 Something doesn't work

Comments

@kevinvugts
Copy link

  • 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

@oliviertassinari
Copy link
Member

This was fixed in the lastest version.

@oliviertassinari
Copy link
Member

I have this fix in mind #18551

@oliviertassinari
Copy link
Member

isFragment is exported in https://unpkg.com/browse/react-is@16.8.0/cjs/react-is.development.js, we should be fine.

@kevinvugts
Copy link
Author

kevinvugts commented Dec 16, 2019

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..

@clintdoriot
Copy link

clintdoriot commented 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']
      }
    })

@oze4
Copy link

oze4 commented May 17, 2020

@kevinvugts what was wrong with your rollup config?

@hakunin
Copy link

hakunin commented Nov 27, 2021

commonjs

This is still an issue, can react-component/util#105 be looked at / merged?

@zannager zannager added the bug 馃悰 Something doesn't work label Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 馃悰 Something doesn't work
Projects
None yet
Development

No branches or pull requests

6 participants