0
点赞
收藏
分享

微信扫一扫

error: Two output files share the same path but have different contents: node_modules\.vite\..xxx.js

张宏涛心理 2022-08-18 阅读 76


问题

今天启动 vite 项目的时候突然报错了,错误提示如下:

Error: Build failed with 2 errors:
error: Two output files share the same path but have different contents: node_modules\.vite\processing\classnames.js.map
error: Two output files share the same path but have different contents: node_modules\.vite\processing\classnames.js

error: Two output files share the same path but have different contents: node_modules\.vite\..xxx.js_错误提示

原因排查

一开始有点懵逼,刚刚还好好的,怎么就报错了,我只是更新了一下依赖的版本,最后我通过注释代码,弄了好久才发现,原来引用 classnames 库的时候写了两个不同的名字,真的服了。

error: Two output files share the same path but have different contents: node_modules\.vite\..xxx.js_错误提示_02


另外还写了个驼峰的 classNames,真是离谱 ta 妈给离谱开门,离谱到家了。

error: Two output files share the same path but have different contents: node_modules\.vite\..xxx.js_vite_03

最后把驼峰的改成小写的 classnames 就行了。

error: Two output files share the same path but have different contents: node_modules\.vite\..xxx.js_vite_04


举报

相关推荐

0 条评论