请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

正在回答 回答被采纳积分+3

1回答

张轩 2025-04-02 22:22:43

同学你好

最新版的是 tailwind.css 4.是一个月前推出的,不需要写配置文件了,你可以参考:

https://tailwindcss.com/docs/installation/using-vite

我看你已经安装完毕了,可以尝试 reload 一下编辑器试试看


0 回复 有任何疑惑可以回复我~
  • 提问者 SapereAudor #1
    安装方法是按照链接的操作,现在就是我安装上按ctrl鼠标点不进去,去掉tsconfig文件后可以点进去,但是还有报红。目前有tsconfig文件下提示错误是
    
    【Cannot find module '@tailwindcss/vite' or its corresponding type declarations. There are types at '/Users/sapereaude/Desktop/vchat/node_modules/@tailwindcss/vite/dist/index.d.mts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.ts(2307) Unable to resolve path to module '@tailwindcss/vite'.eslintimport/no-unresolved)】,
    tailwindcss @tailwindcss/vite这两个我都安装了,在node_modules下是可以找到的。
    
    另外就是,一开始用错了模板,初始化成了仅仅vite的,到最后发现对类型的支持不是很友好,即使文件改成ts也是,然后到接入大模型那些地方都是没有问题的。目前我就是想再初始化一个vite-typescript的,想把之前开发的代码迁过来,但是目前发现在安装tailwindcss的时候,出现了上述的错误。
    回复 有任何疑惑可以回复我~ 2025-04-03 06:32:33
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号