You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
});
install.on("close", (code) => {
if (code !== 0) {
throw new Error(`npm install exited with code ${code}`);
}
resolve6();
});
});
}
However, I'm having a similar issue when attempting the "gitbook dev" action, I get a ENOENT issue which seems to be related to the spawn command also.
The text was updated successfully, but these errors were encountered:
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:
However, I'm having a similar issue when attempting the "gitbook dev" action, I get a ENOENT issue which seems to be related to the spawn command also.
The text was updated successfully, but these errors were encountered: