Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module not found: Can't resolve '@emotion/react'

Tags:

reactjs

I want to install neumorphism-react package.

But I got this error

Module not found: Can't resolve '@emotion/react' in 'C:\Users\Asus\Desktop\react projects\visitor\node_modules@emotion\styled\base\dist'

Here are the dependencies in package.json

"@emotion/core": "^11.0.0",
"@emotion/styled": "^11.0.0",
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.2",
"@testing-library/user-event": "^12.6.0",
"neumorphism-react": "^1.1.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"semantic-ui-react": "^2.0.1",
"web-vitals": "^0.2.4"
like image 367
Yahya Parvar Avatar asked Dec 29 '20 01:12

Yahya Parvar


People also ask

Can not Resolve '@ emotion react?

To solve the error "Module not found: Error: Can't resolve '@emotion/react'", make sure to install the @emotion/react package by opening your terminal in your project's root directory and running the command npm install @emotion/react and restart your dev server.

What is emotion react emotion styled?

styled is a way to create React components that have styles attached to them. It's available from @emotion/styled. styled was heavily inspired by styled-components and glamorous.

How to solve the error 'module not found' in ReactJS?

To solve the error "Module not found: Error: Can't resolve 'react/jsx-runtime'", make sure to update the react package by opening your terminal in your project's root directory and running the command npm install react@latest react-dom@latest and restart your dev server.

Where is the @emotion/react module installed?

The @emotion/react module should NOT be globally installed or be in your project's devDependencies, it should be in the dependencies object in your package.json file. You can try to manually add the line and re-run npm install.

How to solve the error “module not found”?

To solve the error "Module not found: Error: Can't resolve '@emotion/react'", make sure to install the @emotion/react package by opening your terminal in your project's root directory and running the command npm install @emotion/react and restart your dev server.

Does @emotion/core show activity in react?

Show activity on this post. but in recent version they rename the package @emotion/core to @emotion/react, if you use other package that are depending on @emotion/core Show activity on this post. For specific version you can install like : @emotion/[email protected] & @emotion/styled


Video Answer


4 Answers

I had a similar issue and I resolved it by calling:

npm install @emotion/react

or

yarn add @emotion/react
like image 174
Noam Rathaus Avatar answered Oct 14 '22 05:10

Noam Rathaus


I had a similar issue and I resolved it by calling:

npm install @emotion/react 
npm install @emotion/styled

or

 yarn add @emotion/react
 yarn add @emotion/styled
like image 22
ismail ziani Avatar answered Oct 14 '22 06:10

ismail ziani


I had a similar issue and I resolved it by calling:

for the npm:

npm install @emotion/react 
npm install @emotion/styled

for the yarn:

yarn add @emotion/react
yarn add @emotion/styled

For specific version you can install like : @emotion/[email protected] & @emotion/styled

in npm:

npm install @emotion/[email protected]
npm install @emotion/styled

in yarn:

yarn add @emotion/[email protected]
yarn add @emotion/styled
like image 17
Mohammad Avatar answered Oct 14 '22 06:10

Mohammad


An all-stop solution...

npm install @mui/material @emotion/react @emotion/styled
like image 12
abinash_269 Avatar answered Oct 14 '22 05:10

abinash_269