Unable to run npm scripts on windows powershell
Asked
Active
Viewed 63 times
0
-
2The error message tells you everything you need to know: [follow the guidance in the `about_Execution_Policies` help file](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies) – Mathias R. Jessen Feb 01 '22 at 18:00
1 Answers
1
Run powershell as an admin and then

rerun
- 25,014
- 6
- 48
- 78
-
While this works, I suggest mentioning the security implications of choosing such a lax policy. `RemoteSigned` is the safer choice. Also worth mentioning that there's no strict need for elevation (running as admin), which isn't always an option - execution policies can also be set on a per-user basis, with `-Scope CurrentUser` – mklement0 Feb 01 '22 at 21:08