Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG] EACCES Error with Windows 11 App Execution Aliases

Aperta
#157 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, nodejs

Direzione di ricerca

Start at node-which's which.sync path and its isexe dependency, then review the linked isexe PR and compare fs.statSync and fs.accessSync behavior on Windows 11 App Execution Aliases. Reproduce with the mspaint example; done means the alias is returned by which.sync and recognized by isexe.sync.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Needs Triage
Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

The node-which module (and its dependency isexe) encounters EACCES: permission denied errors when checking Windows 11 App Execution Aliases like mspaint.exe located in %LOCALAPPDATA%\Microsoft\WindowsApps\.

Error: EACCES: permission denied, stat 'C:\Users\username\AppData\Local\Microsoft\WindowsApps\mspaint.exe'
    at statSync (node:fs:1740:25)
    at t.statSync (node:electron/js2c/node_init:2:5407)

Windows 11 App Execution Aliases are special files that:

  1. Appear as regular .exe files in directory listings
  2. Can be executed normally from command line
  3. Cannot be accessed with fs.stat() or fs.statSync() - these operations throw EACCES errors
  4. Can be checked for existence using fs.access()
  • The which module correctly returns null when using { nothrow: true }
  • The isexe module correctly returns false when using { ignoreErrors: true }
  • Direct fs.statSync() calls fail with EACCES
  • fs.accessSync() works correctly on the same files
Expected Behavior

Since mspaint.exe is a valid executable in the user's PATH that can be launched successfully, the expected behavior should be:

  • which.sync('mspaint') should return the path to the executable: C:\Users\username\AppData\Local\Microsoft\WindowsApps\mspaint.exe
  • isexe.sync(mspaintPath) should return true (indicating the file is executable)
  • App Execution Aliases should be treated as valid executables since they:
    • Have executable file extensions (.exe)
    • Are included in the system PATH
    • Can be launched successfully from command line
    • Are legitimate Windows applications
Steps To Reproduce
  • Windows 11 system
  • Node.js installed
  • which module installed (npm install which)
  • MS Paint available as App Execution Alias (default on Windows 11)
const which = require('which');
const result = which.sync('mspaint');
console.log('Found mspaint at:', result);
Environment
  • npm: 11.4.2
  • Node: 22.15.0
  • OS: Windows 11
  • platform: Win32

The PR:
https://github.com/isaacs/isexe/pull/40

Lingua principale
JavaScript
Stelle
352
Fork
54
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di npm/node-which

Tutte le issue di npm/node-which

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.