microsoft/powerplatform-vscode

Node and NPM are installed. Cannot install Power Pages generator: Error: spawnSync npm.cmd EINVAL

sethjenners opened this issue · 9 comments

Error
NodeInstalled

Do you have any advice on how to fix this error?

I am facing the same issue, is there any info on this?

I have the same issue, also with a fresh install of VSCode and modules.

Same issue here - fresh installs and latest versions. Any Thoughts?

Same issue as well. Running node v22.9.0, npm 10.8.3 and Power Platform Tools extension 2.0.66.

I think this is caused by security fixes (breaking changes) that were applied to Node.js

I've tried a few different configurations now. So far I'm still getting the same error.

Node.js
22.9.0
20.18.0
18.20.4
17.9.1

Power Platform Tools Extension
2.0.66
2.0.63
2.0.49
2.0.72 (pre-release)

Nothing has worked so far.

Correct @iddycol, it's caused due to that update only:

security update

From that blog:
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.

Fix will be released soon.

Just installed the updated extension and confirmed that the bug is fixed.

Thanks!!!!