未找到模块:无法解析“@emotion/react”

新手上路,请多包涵

我想安装 neumorphism-react 包。

但我得到了这个错误

未找到模块:无法在“C:\Users\Asus\Desktop\react projects\visitor\node_modules@emotion\styled\base\dist”中解析“@emotion/react”

以下是 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"

原文由 Yahya Parvar 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.1k
2 个回答

我有一个类似的问题,我通过调用解决了它:

 npm install @emotion/react

或者

yarn add @emotion/react

原文由 Noam Rathaus 发布,翻译遵循 CC BY-SA 4.0 许可协议

我有一个类似的问题,我通过调用解决了它:

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

要么

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

原文由 ismail ziani 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进