Simple project fails - Failed to load resource: the server responded status of 504 (Gateway Timeout)

Attached repro project, using Unity 2022.2.1f1 this project doesn’t run when exporting in 2.58.1-pre when it worked in older versions prior

Everything in package.json looks up to date, I tried this in a exported bug report project and the same issue happened there, seems to complain about conflicting output files in the error below?


Original Post on Discord

by user 103054507105067008

Terminal output in local server:

  ➜  Local:   #####
  ➜  Network: #####
  ➜  Network: #####
X [ERROR] Two output files share the same path but have different contents: node_modules\.vite\deps_temp\three_examples_jsm_loaders_Dracoloader__js.js

12:10:29 [vite] error while updating dependencies:
Error: Build failed with 1 error:
error: Two output files share the same path but have different contents: node_modules\.vite\deps_temp\three_examples_jsm_loaders_Dracoloader__js.js
    at failureErrorWithLog (C:\Users\Robert.Farthing\Downloads\Bugreport-ModelPreview-230112_uw\project\ModelPreview\node_modules\esbuild\lib\main.js:1575:15)
    at C:\Users\Robert.Farthing\Downloads\Bugreport-ModelPreview-230112_uw\project\ModelPreview\node_modules\esbuild\lib\main.js:1033:28
    at runOnEndCallbacks (C:\Users\Robert.Farthing\Downloads\Bugreport-ModelPreview-230112_uw\project\ModelPreview\node_modules\esbuild\lib\main.js:1447:61)
    at buildResponseToResult (C:\Users\Robert.Farthing\Downloads\Bugreport-ModelPreview-230112_uw\project\ModelPreview\node_modules\esbuild\lib\main.js:1031:7)
    at C:\Users\Robert.Farthing\Downloads\Bugreport-ModelPreview-230112_uw\project\ModelPreview\node_modules\esbuild\lib\main.js:1143:14
    at responseCallbacks.<computed> (C:\Users\Robert.Farthing\Downloads\Bugreport-ModelPreview-230112_uw\project\ModelPreview\node_modules\esbuild\lib\main.js:680:9)
    at handleIncomingPacket (C:\Users\Robert.Farthing\Downloads\Bugreport-ModelPreview-230112_uw\project\ModelPreview\node_modules\esbuild\lib\main.js:735:9)
    at Socket.readFromStdout (C:\Users\Robert.Farthing\Downloads\Bugreport-ModelPreview-230112_uw\project\ModelPreview\node_modules\esbuild\lib\main.js:656:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)

by user 103054507105067008

Can you do a clean install and restart the local server?

Done that in both projects, same happens :frowning_with_open_mouth:

by user 103054507105067008

I was sure clean install would wipe everything but something in node_modules\.vite\deps_temp\three_examples_jsm_loaders_Dracoloader__js.js is sticking it seems

by user 103054507105067008

It even happens in a brand new scene if I copy the scripts over to it, idk if it is something to do with Draco loader potentially being moved in Three

by user 103054507105067008

import * as THREE from "three";
import { DRACOLoader } from "three/examples/jsm/loaders/Dracoloader.js"

by user 103054507105067008

so in your part of the code you’re importing three and Draco?

Please note the script is called DRACOLoader.js not Dracoloader.js

Or could be hot reloading related, I can get it to work after commenting out the dracoloader import,save refresh then uncommenting it- just reproing in the bugreport project

by user 103054507105067008

Can you rename your import to the correct file name?

I did but I think that commenting out then uncommenting the line fixes it in Vite, still suspicious it is a caching in Vite/Hot reload bug - at the start of this vid I opened the bug report project from above and hit play to get the errors then you see what I did after https://drive.google.com/file/d/1Od0RkNsr4gNhJgPUFIbw6IqdxRXmc7et/view?usp=share_link

by user 103054507105067008

I don’t think it’s related to hot reload, you’re just covering the error by mis-using hot reload in that way