Create-react-app: There was an error trying to load the config "styledComponents" for the macro imported from "styled-components/macro. Please see the error thrown for more information.

Created on 13 Aug 2019  路  3Comments  路  Source: facebook/create-react-app

Describe the bug

When using styled-components/macro inside create-react-app latest 3.1.0 it shows following warnings during start and build commands. Did not happen in 3.0.1. Nothing else changed.

There was an error trying to load the config "styledComponents" for the macro imported from "styled-components/macro. Please see the error thrown for more information.
Probably related #2630

Not sure if this is the right place to report it, some related bugs:
https://github.com/styled-components/styled-components/issues/2630
https://github.com/styled-components/styled-components/issues/2713

Did you try recovering your dependencies?

yes

Environment

Environment Info:

  System:
    OS: macOS 10.14.5
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 10.16.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 76.0.3809.100
    Firefox: 66.0.5
    Safari: 12.1.1
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-dom: 16.9.0 => 16.9.0 
    react-scripts: 3.0.1 => 3.0.1 
  npmGlobalPackages:
    create-react-app: 3.0.1
bug report needs investigation

Most helpful comment

I was seeing the same thing with "react-intl.macro". Adding a "babelMacros" section to package.json seems to get rid of the warning: https://github.com/styled-components/styled-components/issues/2630#issuecomment-503300720

All 3 comments

I was seeing the same thing with "react-intl.macro". Adding a "babelMacros" section to package.json seems to get rid of the warning: https://github.com/styled-components/styled-components/issues/2630#issuecomment-503300720

Seeing same issue

Should have been fixed in #8024.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barcher picture barcher  路  3Comments

Aranir picture Aranir  路  3Comments

fson picture fson  路  3Comments

onelson picture onelson  路  3Comments

dualcnhq picture dualcnhq  路  3Comments