James Tuyuc
James Tuyuc

Reputation: 43

Dependency is not renamed

I recently created a project with Gatsby. While I'm trying to use @emotion/core and @emotion/styled it shows me an error.

See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html The @emotion/core package has been renamed to @emotion/react. Please import it like this import { jsx } from '@emotion/react'.

2 |

3 | throw new Error("The @emotion/core package has been renamed to @emotion/react. Please import it like this import { jsx } from '@emotion/react'."); | ^ 4 |

WebpackError: The @emotion/core package has been renamed to @emotion/react. Please import it like this import { jsx } from '@emotion/react'.

I already renamed it and imported as it shows there. I also tried with Gatsby clean and deleted the node_modules and installed again, but still got the error. I appreciate your help.

Upvotes: 4

Views: 6254

Answers (1)

meatcake
meatcake

Reputation: 174

I encountered the same issue and resolved by downgrading the @emotion/core package.

npm install @emotion/[email protected]

Upvotes: 15

Related Questions