How to allow pnpm script on Windows
June 17, 2024
When you run external scripts for example pnpm in Windows you maybe get a Execution_Policies error. To fix this you need to change your execution policies.
First open PowerShell as administrator. Then run Get-ExecutionPolicy to get your current policies.
Get-ExecutionPolicy # Output expected: Restricted
Then change the execution policies to RemoteSigned using the Set-ExecutionPolicy -ExecutionPolicy <PolicyName> command.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
This will change your execution policies and now you can run external scripts like pnpm.
Read more about execution policies in Microsoft learn docs .