gpt4 book ai didi

reactjs - 依赖没有重命名

转载 作者:行者123 更新时间:2023-12-04 00:14:44 25 4
gpt4 key购买 nike

我最近用 Gatsby 创建了一个项目。当我尝试使用 @emotion/core 和 @emotion/styled 时,它显示了一个错误。

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: @emotion/core 包已重命名为 @emotion/react 。请像这样导入 import { jsx } from '@emotion/react'
  • 情感核心.cjs.dev.js:3
    node_modules/@emotion/core/dist/emotion-core.cjs.dev.js:3:1
  • 情感核心.cjs.js:6
    node_modules/@emotion/core/dist/emotion-core.cjs.js:6:20
  • gatsby-ssr.js:9
    node_modules/gatsby-plugin-manifest/gatsby-ssr.js:9:15 enter code here

  • 我已经将它重命名并导入,因为它在那里显示。我也尝试使用 Gatsby clean 并删除 node_modules 并再次安装,但仍然出现错误。我感谢您的帮助。

    最佳答案

    我遇到了同样的问题并通过降级 @emotion/core 包解决了。

    npm install @emotion/core@10.1.1

    关于reactjs - 依赖没有重命名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64825623/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com