刚才,我无缘无故地弄清楚,当我npm run dev
在我的 sveltekit 项目上运行时,我收到了这个错误:
✘ [ERROR] Two output files share the same path but have different contents: node_modules/.vite/lodash_clonedeep.js.map
✘ [ERROR] Two output files share the same path but have different contents: node_modules/.vite/lodash_clonedeep.js
> Build failed with 2 errors:
error: Two output files share the same path but have different contents: node_modules/.vite/lodash_clonedeep.js.map
error: Two output files share the same path but have different contents: node_modules/.vite/lodash_clonedeep.js
error: Two output files share the same path but have different contents: node_modules/.vite/lodash_clonedeep.js.map
error: Two output files share the same path but have different contents: node_modules/.vite/lodash_clonedeep.js
at failureErrorWithLog (/repos/personal/docsndata-monorepo/common/temp/node_modules/.pnpm/esbuild@0.14.25/node_modules/esbuild/lib/main.js:1605:15)
at /repos/personal/docsndata-monorepo/common/temp/node_modules/.pnpm/esbuild@0.14.25/node_modules/esbuild/lib/main.js:1251:28
at runOnEndCallbacks (/repos/personal/docsndata-monorepo/common/temp/node_modules/.pnpm/esbuild@0.14.25/node_modules/esbuild/lib/main.js:1036:63)
at buildResponseToResult (/repos/personal/docsndata-monorepo/common/temp/node_modules/.pnpm/esbuild@0.14.25/node_modules/esbuild/lib/main.js:1249:7)
at /repos/personal/docsndata-monorepo/common/temp/node_modules/.pnpm/esbuild@0.14.25/node_modules/esbuild/lib/main.js:1358:14
at /repos/personal/docsndata-monorepo/common/temp/node_modules/.pnpm/esbuild@0.14.25/node_modules/esbuild/lib/main.js:668:9
at handleIncomingPacket (/repos/personal/docsndata-monorepo/common/temp/node_modules/.pnpm/esbuild@0.14.25/node_modules/esbuild/lib/main.js:765:9)
at Socket.readFromStdout (/repos/personal/docsndata-monorepo/common/temp/node_modules/.pnpm/esbuild@0.14.25/node_modules/esbuild/lib/main.js:635:7)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
我已经这样做了数百次,并且奏效了。
万一这很重要,我的 repo 是一个 rushjs monorepo,我不断地使用它更新我的依赖项,所以也许某些版本在我的依赖项树中碰到了某个地方,但我不知道如何调试它。
是什么导致了这个错误?