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

Posted 凯小默:树上的男爵

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了error: Two output files share the same path but have different contents: node_modules.vite..xxx.js相关的知识,希望对你有一定的参考价值。

问题

今天启动 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

原因排查

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


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

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

以上是关于error: Two output files share the same path but have different contents: node_modules.vite..xxx.js的主要内容,如果未能解决你的问题,请参考以下文章

Code-Output File-Two Way

Android NDK Build: ld: error: failed to write to the output file: Permission denied

tns run ios --bundle Fails clang-4.0: error: cannot specify -o when generated multiple output files

安装RabbitMQ编译erlang时,checking for c compiler default output file name... configure:error:C compiler c

[LeetCode] 680. Valid Palindrome II_Easy tag: Two Pointers

android导入外部db文件,出现Unparsed aapt error(s)! Check the console for output