0

我尝试了npm install @emotion/reactandnpm install @emotion/styled解决方案,错误没有清除。

请帮助

 "dependencies": {
    "@emotion/styled": "^11.3.0",
    "@material-ui/core": "^4.12.3",
    "@mui/material": "^5.1.0",
    "@testing-library/jest-dom": "^5.15.0",
    "@testing-library/react": "^11.2.7",
    "@testing-library/user-event": "^12.8.3",
    "axios": "^0.24.0",
    "chart.js": "^3.6.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "4.0.3",
    "web-vitals": "^1.1.2"
  },
4

2 回答 2

0

你没有正确安装 npm 包,所以,尝试使用这个命令再次安装它们,那些从 package.json 中丢失,没有正确安装

npm install @emotion/styled 
npm install @emotion/core
npm install @emotion/styled

或尝试使用--save标志安装它们

这也适用于我的朋友,

yarn add @emotion/react @emotion/styled styled-components @emotion/core
于 2021-11-10T09:02:13.193 回答
0

安装 npm 后安装 @emotion/styled @emotion/core @emotion/react --save。然后终止正在运行的服务器并重新启动npm start。它对我有用....这也可能对你有用。

于 2021-12-17T14:28:31.833 回答