diff --git a/src/extension/installer.ts b/src/extension/installer.ts index ca8f6cbf93ed..71404539a33a 100644 --- a/src/extension/installer.ts +++ b/src/extension/installer.ts @@ -236,7 +236,8 @@ export class Installer extends EventEmitter implements IInstaller { return new Promise((resolve, reject) => { let args = this.getInstallArguments(this.npm, this.url) this.log(`Installing dependencies by: ${this.npm} ${args.join(' ')}.`) - const child = child_process.spawn(this.npm, args, { + const cmd = process.platform === 'win32' ? `"${this.npm}"` : this.npm + const child = child_process.spawn(cmd, args, { cwd: folder, shell: process.platform === 'win32', env: Object.assign(process.env, { NODE_ENV: 'production' })