Skip to content

Commit fba90dc

Browse files
committed
fix: Error: spawn npm ENOENT on windows
1 parent 954028a commit fba90dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/helpers/packageInstaller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const packageInstall = (packageDir) => {
6363
logger.error(`Some error occurred while installing packages: ${error}`);
6464
reject(`Packages were not installed successfully.`);
6565
};
66-
nodeProcess = spawn('npm', ['install'], {cwd: packageDir});
66+
nodeProcess = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['install'], {cwd: packageDir});
6767
nodeProcess.on('close', nodeProcessCloseCallback);
6868
nodeProcess.on('error', nodeProcessErrorCallback);
6969
});

0 commit comments

Comments
 (0)