Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

Bug Report: Build hangs during compile-src due to missing nls.messages.json #615

Open

Description

@sudghosh
  1. The npm run compile build process completes with "0 errors", but the out/nls.messages.json file is missing from the output directory. This causes the application to fail at runtime with an ENOENT error.

Upon investigating the build scripts, it appears the NLS (localization) generation step within compileTask is skipped because a build flag is set to false. Modifying the gulpfile.js to set this flag to true enables the NLS step, but then the compile-src task hangs indefinitely during compilation.

Environment:

Operating System: Windows 11
RAM: 8GB
Steps to Reproduce:

Clone the Void editor repository.
Ensure the necessary build tools for native modules are installed (e.g., Visual Studio 2019 Build Tools with C++ and Node.js build tools, including Spectre-mitigated libs if required).
Run npm install in the root of the repository.
Run npm run buildreact.
Run npm run compile.
Observe that npm run compile finishes with "0 errors" in the final summary.
Manually check the C:\Users\YourUsername\Desktop\VoidCustomised\void\out\ directory. Confirm that nls.messages.json is not present.
Attempt to launch the application manually from the root directory (replace the user data path with a temporary empty folder):
PowerShell

cd C:\Users\YourUsername\Desktop\VoidCustomised\void
..build\electron\Void.exe . --user-data-dir=C:\Path\To\Some\Temp\UserData
Observe that the application window is blank and the following error appears in the terminal:
Error reading NLS messages file C:\Users\YourUsername\Desktop\VoidCustomised\void\out\nls.messages.json: Error: ENOENT: no such file or directory, open 'C:\Users\YourUsername\Desktop\VoidCustomised\void\out\nls.messages.json'
Open the file build/gulpfile.js.
Find the definition of compileClientTask:
JavaScript

const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), compileApiProposalNamesTask, compileTask('src', 'out', false)));
Change the false to true in the compileTask call:
JavaScript

const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), compileApiProposalNamesTask, compileTask('src', 'out', true)));
Save the build/gulpfile.js file.
Run npm run compile again.
Observed Behavior:

After step 14, the npm run compile process starts and progresses through initial tasks, but then hangs indefinitely during the compile-src phase, specifically after printing "Starting compilation...". It does not complete or report a final status, even after extended periods (e.g., over an hour).

Here is the relevant part of the compile log where it gets stuck:

[timestamp] Starting compile-src ...
[timestamp] [mangler] Done collecting. Classes: XXXX. Exported symbols: YYYY
[timestamp] [mangler] Done creating class replacements
[timestamp] [mangler] Starting prepare rename edits
[timestamp] Starting compilation...
(Process hangs here)
(Note: The timestamps and counts may vary).

Expected Behavior:

The npm run compile command should complete successfully, generating all necessary build output files, including out/nls.messages.json. The application (Void.exe) should then launch and display the editor interface without errors.

Investigation:

Confirmed out/nls.messages.json is missing after a standard npm run compile.
Traced the NLS generation to the .pipe(util.$if(build, nls.nls(...))) step within createCompile in build/lib/compilation.js.
Identified that compileClientTask in build/gulpfile.js calls compileTask with build: false, skipping NLS generation.
Modifying build/gulpfile.js to set build: true for compileTask in compileClientTask enables the NLS step but causes the hang.
A separate issue with npm run update-localization-extension causing a TypeError was identified and a temporary fix applied, but this script doesn't appear to be the primary source of the missing out/nls.messages.json for the core build.
This hang during NLS processing appears to be a bug or significant performance issue within the build scripts for this specific version/configuration.

Activity

  1. vrtnis commented on May 21, 2025

    @vrtnis
    Contributor

    thanks for the details! heads-up: flipping that flag to true basically tells the build to run the production pipeline. typeScript recompiles in “build” mode...then the mangler: minifier:nls bundler chain fires up. this e.g. terser/uglify alone can chew 4-6 gigs on windows. it seems like the machine only has 8 gigs, node often just runs out of heap and silently hangs right after it prints “starting compilation" that this is stuck at. bumping Node’s heap (e.g. node_options=--max_old_space_size=4096) + closing tasks like defender, browsers, etc. temporarily usually lets it finish...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions