为什么我无法导入 @rainbow-me/rainbowkit/styles.css?
我正在尝试将RainbowKit
和WAGMI
集成到当前使用Web3
的现有网站中。当我评论导入的样式时,它确实很丑陋。我已经确保NPM是最新版本,RainbowKit和Wagmi也是如此。
我的导入语句:
导入'@rainbow-me/rainbowkit/styles.css'
结果:
无法编译。
./src/App.tsx
Module not found: Can't resolve '@rainbow-me/rainbowkit/styles.css' in '/home/apollo/manifest-github/physical-claim-frontend/src'
I am trying to integrate rainbowkit
and wagmi
into an existing website that currently uses web3
. It works when I comment out the styles import but it just looks really ugly. I have made sure npm is latest version and so are rainbowkit and wagmi.
My import statement:
import '@rainbow-me/rainbowkit/styles.css'
result:
Failed to compile.
./src/App.tsx
Module not found: Can't resolve '@rainbow-me/rainbowkit/styles.css' in '/home/apollo/manifest-github/physical-claim-frontend/src'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也遇到了这个问题。
我替换了进口的
非混叠路径
似乎现在已经编译了!
I was having this issue as well.
I replaced the import with
which is the non aliased path
seems to be compiling fine now!
我通过替换
import'@rainbow-me/rainbowkit/styles.css'
导入>导入>导入'@rainbow-me/rainbowkit/dist/dist/index.css'
来修复它。I fixed it by replacing
import '@rainbow-me/rainbowkit/styles.css'
toimport '@rainbow-me/rainbowkit/dist/index.css'
;