zapier-platform icon indicating copy to clipboard operation
zapier-platform copied to clipboard

[Bug]: zappier push throws "spawn EINVAL" error

Open jaydamani opened this issue 9 months ago • 0 comments

Bug Description

When you execute zapier push on a Windows system with Nodejs version 18.20.2. It results in the below error

✔ Copying project to temp directory
✖ Installing project dependencies
 »   Error: spawn EINVAL
 »
 »   re-run this command with `--debug` for more info

The same error is thrown by zapier test or any other command that tries to execute npm as part of it. As a workaround you can use an older version of node like 18.12.0

Reproduction Steps

create an integration using zapier-cli on a windows device with Nodejs 18.20.2 (LTS) and execute zapier test or zapier push

Zapier Platform version

15.7.2

Node.js version

18.20.2

Your Operating System

Windows 10 (win32-x64)

npm/yarn version

10.5.0

App ID

No response

More Details

It is caused by runCommand function due to changes in child_process.spawn which now requires shell option to be true for executing .cmd or .bat commands. This change was from cve-2024-27980.

I would like to make a PR for this. Is it ok to just update the runCommand function to set shell as true?

jaydamani avatar May 10 '24 20:05 jaydamani