spawn EINVAL issue when attempting to create new integration using NodeJS in Windows #761
Unanswered
jjhritz89
asked this question in
0. General bugs and questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Due to a security change in Node.js for Windows (CVE-2024-27980) linked here The "gitbook new" action would throw a spawn EINVAL error when attempting to install dependencies.
The fix I had to do, was add shell:true to the installdependencies function as shown here:
function installDependencies(dirPath) { return new Promise((resolve6, reject) => { const install = (0, import_child_process2.spawn)(/^win/.test(process.platform) ? "npm.cmd" : "npm", ["install"], { studio: "inherit", shell: true, cwd: dirPath });
Beta Was this translation helpful? Give feedback.
All reactions