【问题标题】:Tailwindcss React Error, Module not found: Error: Can't resolve '/Assets/images/talentWorldWide.jpg',Tailwindcss React 错误,找不到模块:错误:无法解析“/Assets/images/talentWorldWide.jpg”,
【发布时间】:2022-07-12 19:51:36
【问题描述】:

我不知道发生了什么我什至没有在任何地方使用此图像,但它仍然显示未找到,但它在文件夹中。

enter image description here enter image description here

【问题讨论】:

  • 如果您将错误消息剪切并粘贴到您的问题中而不是链接到图像中将会很有帮助。
  • 你有webpack.config.js吗?
  • 另外,您能否包含失败的 JSX 文件 talent-world-wide.jsx 以及 src/index.css
  • 当然,不,我没有 webpack.config.js,当然我会添加这些文件,但不知何故修复了错误,我删除了 assets 文件夹,而不是使用我所在文件夹中的图像使用 http 图像。

标签: reactjs tailwind-css


【解决方案1】:

检查以确保您在链接时使用正确的路径,例如:

./Assets/images/whateveryourimageis.jpg

or if your folder is up a directory level

../Assets/images/whateveryourimageis.jpg

确保链接时路径正确,有关包含错误的文件和文件结构的更多信息可能有助于我们提供更好的指导。

【讨论】:

    【解决方案2】:

    ȗȼϥϥθĸѷϸƚϸƚјћ电ѣъϥъϥѩѩѣѣѣѣѣ ВҟÚΒӃ

    【讨论】:

      猜你喜欢
      • 2016-10-27
      • 1970-01-01
      • 2017-03-31
      • 1970-01-01
      • 2022-06-16
      • 2023-01-10
      • 1970-01-01
      • 2019-01-30
      • 2016-03-09
      相关资源
      最近更新 更多