daveshanley / vacuum

vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. Built in go, it tears through API specs faster than you can think. vacuum is compatible with Spectral rulesets and generates compatible reports.
https://quobix.com/vacuum
MIT License
633 stars 51 forks source link

Couldn't start client vacuum #538

Open sk185050 opened 2 months ago

sk185050 commented 2 months ago

[Error - 4:23:00 PM] Starting client failed Error: spawn EINVAL at ChildProcess.spawn (node:internal/child_process:421:11) at Object.spawn (node:child_process:799:9) at c:\Users\.vscode\extensions\pb33f.vacuum-0.0.7\node_modules\vscode-languageclient\lib\node\main.js:383:40

LasneF commented 2 months ago

can you provide the version of vacuum and nodeJS used , it might be related to nodeJs installation not sure if that is related ( https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 )

so you may proceed an node ugrade , please share your result

LasneF commented 2 months ago

looks an issue in the way the vacuum is launched from vscode (and may be due to vscode update) @daveshanley is the vscode extension opensource , but the correction looks simple

we just need to add a dedicated parameter to make it back available on windows as mentionned in nodeJS doc

" It is important to note that there has been a breaking change for Windows users who utilize child_process.spawn and child_process.spawnSync. Node.js will now error with EINVAL if a .bat or .cmd file is passed to child_process.spawn and child_process.spawnSync without the shell option set. If the input to spawn/spawnSync is sanitized, users can now pass { shell: true } as an option to prevent the occurrence of EINVALs errors."

daveshanley commented 2 months ago

mmm.. ok, will look into this asap.