Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Crash on Windows 11 with TypeError: execa.sync is not a function #33

Closed
nichita-rusin opened this issue Jun 10, 2024 · 1 comment · Fixed by #34
Closed

[BUG] Crash on Windows 11 with TypeError: execa.sync is not a function #33

nichita-rusin opened this issue Jun 10, 2024 · 1 comment · Fixed by #34

Comments

@nichita-rusin
Copy link
Contributor

Environment

  • OS: Windiws 11 Pro 23H2
  • node: 20.14.0
  • npm: 10.7.0
  • windows-release: 6.0.0

Description

Calling windowsRelease() throws an error:

$ node index.js
file:///C:/flow/node_modules/windows-release/index.js:42
                        stdout = execa.sync('powershell', ['(Get-CimInstance -ClassName Win32_OperatingSystem).caption']).stdout || '';
                                       ^

TypeError: execa.sync is not a function
    at windowsRelease (file:///C:/flow/node_modules/windows-release/index.js:42:19)
    at file:///C:/flow/index.js:3:13
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)

Node.js v20.14.0
error Command failed with exit code 1.

Cause

execa release v6.0.0 included a breaking change that removed the execa.sync function. When windows-release was upgraded to v6, the code was not modified to reflect this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant