Skip to content

Commit d322fbe

Browse files
Merge pull request #221 from viszkoktamas/fix-npm-issue-on-windows
Fix "Error: spawn npm ENOENT" on windows
2 parents 80d63e0 + fba90dc commit d322fbe

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)