【问题标题】:error in emotion/styled package, cannot find answer ANYWHERE情感/样式包中的错误,在任何地方都找不到答案
【发布时间】:2021-06-20 05:49:37
【问题描述】:

我不断收到以下错误,我目前使用的是流星 2.1

错误:@emotion/styled 包中的新入口点 @emotion/styled/base 已替换 @emotion/styled-base 包。请删除此包并改用@emotion/styled/base

我找不到任何方法来安装这个@emotion/styled/base 包。 @emotion/styled-base 已安装,我无法突然创建构建。

有什么建议吗???

我正在使用 reactjs

【问题讨论】:

  • 您是否已经尝试过删除package-lock.json 并再次运行meteor npm install?你也可以发布你的package.json吗?

标签: npm meteor emotion emotion-js


【解决方案1】:

@emotion/styled/base 不是您需要安装的包,而是@emotion/styled 包的子模块。

我有一种预感,您没有直接使用 @emotion/styled-base,所以很可能您的版本不匹配,您安装了较新版本的 @emotion/styled,但该软件包是为旧版本编写的。你可能只需要找到这个有问题的包并更新它。

如果不是这种情况,那么您只需将 @emotion/styled-base 的导入替换为 @emotion/styled/base 的导入

【讨论】:

  • 不,我没有直接在任何地方使用情感/风格基础。这句话是什么意思?
  • 很可能是版本不匹配,您安装了较新版本的 @emotion/styled,但该软件包是为旧版本编写的
  • 什么意思,那个包,哪个包
  • 我正在使用@emotion/styled": "^11.1.5",如果有帮助的话
  • 我的意思是,如果您不直接在您的应用程序中导入@emotion/styled-base,那么必须有另一个包,可能是您的应用程序使用的包,正在导入它。如果您的应用程序没有直接依赖于 @emotion/styled-base,请尝试运行 npm ls @emotion/styled-base 以查看哪个包依赖于它。
猜你喜欢
  • 1970-01-01
  • 2017-10-28
  • 2019-08-19
  • 1970-01-01
  • 1970-01-01
  • 2018-11-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多