Test Automation Blog

Tools, Tips and Thoughts for Playwright, Selenium UI and API automated testing

Fixing the “is not digitally signed” error in VSCode

Are you getting an error when trying to execute commands in the Visual Studio Code terminal window, with the error message containing the text “{executable file} is not digitally signed”?

For example when running "yarn dev" I get this error message:

PS C:\aawork\aaUdemy\repos\realworld-app> yarn dev
yarn : File C:\Users\dell 7280\AppData\Roaming\npm\yarn.ps1 cannot be loaded. The file C:\Users\dell 7280\AppData\Roaming\npm\yarn.ps1 is 
not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution 
policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ yarn dev
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\aawork\aaUdemy\repos\realworld-app>

Here’s the actual screenshot:

One way to fix this is to run this code and then try again:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

A couple of things to note:

  • if you get this problem then you’ll need to run this code every time you open Visual Studio Code, and in fact every time you open a new Terminal window within VS Code
  • so keep this code handy – I like to put mine in the README file of the project

Fixing the “is not digitally signed” error in VSCode
Scroll to top