Cannot take production build

Hi,
Trying to take a production build, but getting needle pipeline error. Sent a bug report as well.

Hi Ashok, thanks for reaching out. The needle pipeline error during a production build is often caused by the build process not finding the required toktx executable. The production build compresses textures using KTX2, and for that to work you must have toktx installed and available in your system PATH.

Please ensure you have downloaded and installed toktx from its official release page (Releases · KhronosGroup/KTX-Software · GitHub) and that the binary is added to your system’s PATH. On Windows, for example, the default install location is “C:\Program Files\KTX-Software\bin” and you might need to restart your computer after adding it to your PATH, as detailed in the deployment documentation (docs/deployment.html).

If you’ve confirmed that toktx is installed correctly and are still encountering this error, please share the complete error log or additional details about your production build setup (e.g., the Needle Engine version, your operating system, etc.) so we can help troubleshoot the issue further.

1 replies left - Become PRO for more replies.
thread_lSYQM6WEBuaqE2RRTeBkuSjK
Reply to this post directly if you need further help (bottom right button)

Hi,
We didnt receive a bugreport yet. How did you send it?

  1. Can you check the rest of the console log further above?
  2. Which version of Needle Engine are you using?

Thank you

Sorry, it uploaded just now.

  1. There are no other errors apart from this one.
  2. 4.5.3
    image

Hi, so far I can’t reproduce the issue (the build succeeds on my end).
How did you invoke the build? I guess you ran npm run build:production from your commandline?

Hi,
I tried to create a build through the needle build window in Unity and using the command line as well, but in both cases, it ended up as a failure.

Could you try and add verbose debug logs to the build pipeline process? Please modify line 20 in vite.config.js like this:

needlePlugins(command, needleConfig, { buildPipeline: { verbose: true } }),

Then start the build from the commandline like this:

npm run build:production > debug.log

The logs will be written to a file debug.log. Please DM me the file

1 Like

The build succeeds this time. Will send debug file to you once i face that issue again.

1 Like