Production Build Failed – ENOENT Error for Missing File

Hi,

The production build failed with the following error:
ERR: failed to process file “C:\unityExp\WebGLMobile_2025_Test2\Needle\frontend_src\dist/assets/AW_M18R2_Touchpad.glb”, Reason: ENOENT: no such file or directory, open ‘C:\Users\KAALO_~1\AppData\Local\Temp\Needle\build-pipeline-cache\2_7_0\mesh_lod_1_21351871212914-187529271519031467714079022196920664901119194817-745551322-187529271519031467714079022196920664901119194817-745551322-187529271519031467714079022196920664901119194817-745551322-187529271519031467714079022196920664901119194817-7455513221278155204-1450029438.bin’
I have already tried:

  • Deleting the npx cache
  • Deleting the Library folder of the Unity project
  • Clearing system temp files

Despite these issues in production, I was able to successfully take development builds. Any suggestions on resolving this?


Hi Ashok,

The error you’re encountering, ENOENT: no such file or directory, typically indicates that the build process is unable to find a specific file. Here are some troubleshooting steps you can follow to resolve this issue:

  1. Check File Existence: Ensure that the file mentioned (AW_M18R2_Touchpad.glb) exists in the specified directory. Sometimes files can be excluded inadvertently during export.

  2. Build Configuration: Since development builds are working fine, double-check the settings used in your production build. There might be differences in configurations that affect file inclusion.

  3. Cache Issues: Since you’ve already cleared the npm cache and system temp files, try manually deleting any build cache. Look into:

    • The build-pipeline-cache folder you referenced.
    • The dist folder prior to building again.
  4. Asset Settings: Check if you have any settings in your project that might exclude certain assets from being included during production builds. Sometimes, specific flags or scripts can inadvertently skip files.

  5. Gzip Compression: If you are using gzip compression, ensure that it is being correctly set in your build settings. Disabling gzip can sometimes resolve issues with files not being found (see deployment).

  6. Inspect Build Pipeline and NPM Packages: Ensure that all necessary npm packages are properly installed and their versions align with your project requirements.

  7. Run Build Scripts: If your project has pre-build scripts defined in package.json, make sure they run successfully. These scripts might be responsible for preparing or copying the necessary assets for the production build (see the documentation).

  8. Error Logs: Check for more detailed error logs that might provide additional hints on what went wrong during the build process.

If you execute these steps and still face the issue, please provide additional details such as the specific build environment version (Unity, Needle Engine, and Node.js versions) you are using. This information will help diagnose the problem more accurately.

1 replies left - Get a PRO license for more AI replies.
thread_FBeryPUaRlX0ED76iQeZUTPj
Reply to this message to continue the conversation

Hello, could you send a bugreport with this scene so we can check if it reproduces?

Thank you!

uploaded a bug report. Thanks

1 Like

Thank you, it does reproduce. Will take a look

1 Like

It should be fixed in the next update later today.

Thanks! Looking forward to it.

Please try if 4.1.1 fixes the issue for you

will try and update

Thanks for the swift response. It worked