DimiMikadze / create-react-library

React NPM library starter kit based on Facebook's create react app
MIT License
602 stars 60 forks source link

Module is not exported error with semantic-ui-react #51

Closed danydhondt closed 5 years ago

danydhondt commented 5 years ago

Hi, I've been using create-react-library and semantic-ui-react for over a year now. No problems what so ever. Since I updated create-react-library, It's impossible to have a clean working library anymore.

Here are the steps to reproduce the error:

  1. create a new library: I use yarn and default configuration.
  2. yarn add semantic-ui-react (I use --dev)
  3. add a simple button in index.js:

return( <div className={styles.test}> <Button>Semantic button</Button> Example Component: {text} </div> )

When compiling this, I get the following error:

[!] Error: 'isForwardRef' is not exported by node_modules/react-is/index.js

I try to solve this with adding isForwardRef to the namedExports in Rollup:

commonjs({
  namedExports: {
    'node_modules/react-is/index.js': ['isForwardRef']
  }
})

This works (the module compiles) but gives me tons of Circular dependency warnings.

It's very frustrating since is used to work without any problem. The problems started when I upgraded create-react-library

Any thoughts?

DimiMikadze commented 5 years ago

Hi @danydhondt i think you've opened issue for wrong repository, we aren't using Rollup at all

danydhondt commented 5 years ago

I'm sorry, I was indeed referring to transitive-bullshit/create-react-library, my bad. Is your repo an alternative to this one? If so, I will surely try it out.

ccavales3 commented 4 years ago

@danydhondt I am experiencing the same issue as you. Have you created an issue in transitive-bullshit/create-react-library for this? I was wondering if they are looking in to this issue. I went to their list of issues and it doesn't seem like they have one for your issue above