Kaynağa Gözat

fix: npm install error on Windows (spawn EINVAL) (#1214)

Krista Vlastou 1 ay önce
ebeveyn
işleme
4b7e09e157
3 değiştirilmiş dosya ile 345 ekleme ve 244 silme
  1. 1 0
      mod_packages/testex/package.json
  2. 342 243
      package-lock.json
  3. 2 1
      src/backend/src/Kernel.js

+ 1 - 0
mod_packages/testex/package.json

@@ -0,0 +1 @@
+{}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 342 - 243
package-lock.json


+ 2 - 1
src/backend/src/Kernel.js

@@ -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 ) {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor