Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Error: spawn powershell.exe ENOENT #150

Closed
MahmoudMabrok opened this issue Oct 22, 2019 · 4 comments
Closed

Error: spawn powershell.exe ENOENT #150

MahmoudMabrok opened this issue Oct 22, 2019 · 4 comments

Comments

@MahmoudMabrok
Copy link

while executing npm-windows-upgrade i got

npm-windows-upgrade v6.0.1
events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: spawn powershell.exe ENOENT
←[90m    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)←[39m
←[90m    at onErrorNT (internal/child_process.js:456:16)←[39m
←[90m    at processTicksAndRejections (internal/process/task_queues.js:80:21)←[39m
Emitted 'error' event on ChildProcess instance at:
←[90m    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)←[39m
←[90m    at onErrorNT (internal/child_process.js:456:16)←[39m
←[90m    at processTicksAndRejections (internal/process/task_queues.js:80:21)←[39m {
  errno: ←[32m'ENOENT'←[39m,
  code: ←[32m'ENOENT'←[39m,
  syscall: ←[32m'spawn powershell.exe'←[39m,
  path: ←[32m'powershell.exe'←[39m,
  spawnargs: [ ←[32m'-NoProfile'←[39m, ←[32m'-NoLogo'←[39m, ←[32m'Get-ExecutionPolicy'←[39m
 ]
}

@MahmoudMabrok
Copy link
Author

MahmoudMabrok commented Oct 22, 2019

Complete solution is

  • First add Poweshell to PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0.
  • open powershell as admin and write this command Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force.
  • last thing fire npm-windows-upgrade.

@kmaniruddin28
Copy link

Complete solution is

  • First add Poweshell to PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0.
  • open powershell as admin and write this command Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force.

@thriftykapila
Copy link

Complete solution is

  • First add Poweshell to PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0.
  • open powershell as admin and write this command Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force.
  • last thing fire npm-windows-upgrade.

this doesn't solves the issue

@Sourabh42
Copy link

Complete solution is

  • First add Poweshell to PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0.
  • open powershell as admin and write this command Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force.

Thanks For Solution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants