Skip to content

No such file in '/home/user/BetterSoundCloud/node_modules/electron/path.txt #99

Description

@Makar986

[makar@arch ~]$ bash <(curl -fsSL https://raw.githubusercontent.com/AlirezaKJ/BetterSoundCloud/main/install_bettersoundcloud.sh)
=== Installing BetterSoundCloud ===
Checking system requirements...
Detected system: Arch Linux (pacman)
warning: git-2.54.0-1 is up to date -- skipping
warning: curl-8.20.0-7 is up to date -- skipping
there is nothing to do
✔ Node.js is already installed.
Updating existing code...
From https://github.com/AlirezaKJ/BetterSoundCloud

changed 1 package in 818ms
✔ Libraries installed.
Creating launcher script...
Creating desktop entry...

✔ Installation complete!
Run with: /home/makar/BetterSoundCloud/start.sh
[makar@arch ~]$ /home/makar/BetterSoundCloud/start.sh
🔄 Checking for updates...
▶ Starting BetterSoundCloud...
npm warn Unknown project config "electron_mirror". This will stop working in the next major version of npm. See npm help npmrc for supported config options.
npm warn Unknown project config "electron_use_remote_checksums". This will stop working in the next major version of npm. See npm help npmrc for supported config options.

bettersoundcloud@0.7.1 start
electron-forge start

✔ Checking your system
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies [0.1s]
✔ Running generateAssets hook
✔ Running preStart hook
✔ Launched Electron app. Type rs in terminal to restart main process.
Downloading Electron binary...

An unhandled rejection has occurred inside Forge:
Error: ENOENT: no such file or directory, open '/home/makar/BetterSoundCloud/node_modules/electron/path.txt'
at Object.readFileSync (node:fs:436:20)
at getElectronPath (/home/makar/BetterSoundCloud/node_modules/electron/index.js:47:25)
at Object. (/home/makar/BetterSoundCloud/node_modules/electron/index.js:52:18)
at Module._compile (node:internal/modules/cjs/loader:1873:14)
at Object..js (node:internal/modules/cjs/loader:2013:10)
at Module.load (node:internal/modules/cjs/loader:1596:32)
at Module._load (node:internal/modules/cjs/loader:1398:12)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.require (node:internal/modules/cjs/loader:1619:12)
at require (node:internal/modules/helpers:191:16)
at locateElectronExecutable (/home/makar/BetterSoundCloud/node_modules/@electron-forge/core/dist/util/electron-executable.js:12:28)
at async forgeSpawn (/home/makar/BetterSoundCloud/node_modules/@electron-forge/core/dist/api/start.js:126:32)
at async forgeSpawnWrapper (/home/makar/BetterSoundCloud/node_modules/@electron-forge/core/dist/api/start.js:160:25)
at async /home/makar/BetterSoundCloud/node_modules/@electron-forge/core/dist/api/start.js:197:21
at async /home/makar/BetterSoundCloud/node_modules/@electron-forge/tracer/dist/index.js:58:20
at async /home/makar/BetterSoundCloud/node_modules/@electron-forge/cli/dist/electron-forge-start.js:59:21
[makar@arch ~]$

Activity

  1. Njill commented on Jun 17, 2026

    @Njill

    @Makar986, I managed to fix this awhile back myself, you just need to install Electron it's self and it should run after you point BSC to the installed version.

  2. Makar986 commented on Jun 24, 2026

    @Makar986
    Author

    @Njill, It didn't help, I'm already using a better service

  3. luqenov commented on Jul 7, 2026

    @luqenov

    Fix: Electron install silently fails on Linux (extract-zip bug)

    npm install finishes without errors, but launching the app throws:

    Error: ENOENT: no such file or directory, open 'node_modules/electron/path.txt'
    

    Only locales/ (or a single file) appears in node_modules/electron/dist/, and the actual electron binary is missing.

    Root cause: A Node.js streams regression (nodejs/node#62557) breaks extract-zip (the library Electron's installer uses internally). The zip downloads correctly and passes checksum validation, but extraction silently stops after the first entry and the process exits with code, no error, no warning. This affects Electron, Cypress, and Playwright installs alike (electron/electron#51623).

    Workaround: extract manually with the system unzip

    1. Go to the electron package folder and clear the broken partial extraction:
    cd node_modules/electron
    rm -rf dist
    1. Find the already-downloaded zip in Electron's cache (it's already there, checksum-valid, no re-download needed):
    find ~/.cache/electron -name "electron-v*.zip"
    1. Extract it manually with unzip (replace the path with what step 2 found):
    mkdir -p dist
    unzip -q "<path_from_step_2>" -d dist
    1. Verify the binary is there:
    ls dist/

    You should see the electron executable, resources/, locales/, etc. and not just a single file.

    1. Create the missing path.txt that the electron npm package expects (on Linux the value is just electron):
    echo -n "electron" > path.txt
    1. Go back to your project root and run it:
    cd ../..
    ./start.sh    # or npm start / electron-forge start

    Notes

    • If find in step 2 comes up empty, the zip may not have downloaded yet, run node install.js inside node_modules/electron first (it'll download+checksum but stall on extraction), then repeat from step 2.
    • This is a Node.js-level bug, not specific to any Electron fork and the same steps apply whether you're using stock Electron or a custom mirror (e.g. castlabs' Widevine-enabled build).
    • Downgrading Node.js to a version predating the regression should also avoid the issue, but manual extraction is faster if you just need to get unblocked.
  4. luqenov commented on Jul 7, 2026

    @luqenov

    @AlirezaKJ you really should take a look at this twin

  5. Makar986 commented on Jul 26, 2026

    @Makar986
    Author

    Fix: Electron install silently fails on Linux (extract-zip bug)

    npm install finishes without errors, but launching the app throws:

    Error: ENOENT: no such file or directory, open 'node_modules/electron/path.txt'
    

    Only locales/ (or a single file) appears in node_modules/electron/dist/, and the actual electron binary is missing.

    Root cause: A Node.js streams regression (nodejs/node#62557) breaks extract-zip (the library Electron's installer uses internally). The zip downloads correctly and passes checksum validation, but extraction silently stops after the first entry and the process exits with code, no error, no warning. This affects Electron, Cypress, and Playwright installs alike (electron/electron#51623).

    Workaround: extract manually with the system unzip

    1. Go to the electron package folder and clear the broken partial extraction:
    

    cd node_modules/electron
    rm -rf dist

    2. Find the already-downloaded zip in Electron's cache  (it's already there, checksum-valid, no re-download needed):
    

    find ~/.cache/electron -name "electron-v*.zip"

    3. Extract it manually with `unzip` (replace the path with what step 2 found):
    

    mkdir -p dist
    unzip -q "<path_from_step_2>" -d dist

    4. Verify the binary is there:
    

    ls dist/

    You should see the electron executable, resources/, locales/, etc. and not just a single file.

    5. Create the missing `path.txt` that the electron npm package expects (on Linux the value is just `electron`):
    

    echo -n "electron" > path.txt

    6. **Go back to your project root and run it:**
    

    cd ../..
    ./start.sh # or npm start / electron-forge start

    Notes

    * If `find` in step 2 comes up empty, the zip may not have downloaded yet, run `node install.js` inside `node_modules/electron` first (it'll download+checksum but stall on extraction), then repeat from step 2.
    
    * This is a Node.js-level bug, not specific to any Electron fork and the same steps apply whether you're using stock Electron or a custom mirror (e.g. castlabs' Widevine-enabled build).
    
    * Downgrading Node.js to a version predating the regression should also avoid the issue, but manual extraction is faster if you just need to get unblocked.
    

    yoo bro, thank you so much

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions