mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-12 18:19:28 -05:00
fix: npm install error on Windows (spawn EINVAL) (#1214)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{}
|
||||
Generated
+580
-564
File diff suppressed because it is too large
Load Diff
@@ -399,7 +399,8 @@ class Kernel extends AdvancedBase {
|
||||
}
|
||||
|
||||
async run_npm_install (path) {
|
||||
const proc = spawn('npm', ['install'], { cwd: path, stdio: 'inherit' });
|
||||
const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
|
||||
const proc = spawn(npmCmd, ["install"], { cwd: path, shell: true, stdio: "inherit" });
|
||||
return new Promise((rslv, rjct) => {
|
||||
proc.on('close', code => {
|
||||
if ( code !== 0 ) {
|
||||
|
||||
Reference in New Issue
Block a user