• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

I Like Kill Nerds

The blog of Australian Front End / Aurelia Javascript Developer & brewing aficionado Dwayne Charrington // Aurelia.io Core Team member.

  • Home
  • Aurelia 2
  • Aurelia 1
  • About
  • Aurelia 2 Consulting/Freelance Work

Using PowerShell In Visual Studio Code

Web · September 4, 2020

I recently built a new PC and did a clean Windows 10 install. As a result, I had to reinstall VSCode and everything else. I use PowerShell as my prefered shell in VSCode and encountered an error I sort of remember from when I did my last fresh install.

The error in my case reads File C:\Users\dwayn\AppData\Roaming\npm\yarn.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Your error might differ from mine, but I was trying to globally install Yarn via Npm and then run it. To fix the issue, it’s quite simple.

Open up a PowerShell terminal and run it as an administrator (right-click, run as administrator) and run the following command:

Set-ExecutionPolicy –ExecutionPolicy RemoteSigned

It’ll give you a warning and ask if you want to change the execution policy, enter A to answer yes to all. That’s it, that should now all you to run Node packages that have been installed globally and fix any other issues around the building of packages.

Dwayne

Leave a Reply Cancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular

  • I Joined Truth Social Using a VPN and Editing Some HTML to Bypass the Phone Verification
  • Testing Event Listeners In Jest (Without Using A Library)
  • How To Get The Hash of A File In Node.js
  • Thoughts on the Flipper Zero
  • Waiting for an Element to Exist With JavaScript
  • How To Paginate An Array In Javascript
  • How To Mock uuid In Jest
  • How To Decompile And Compile Android APK's On A Mac Using Apktool
  • How To Get Last 4 Digits of A Credit Card Number in Javascript
  • Wild Natural Deodorant Review

Recent Comments

  • CJ on Microsoft Modern Wireless Headset Review
  • Dwayne on Microsoft Modern Wireless Headset Review
  • CJ on Microsoft Modern Wireless Headset Review
  • john on Microsoft Modern Wireless Headset Review
  • Dwayne on Why You Should Be Using globalThis Instead of Window In Your Javascript Code

Copyright © 2023 · Dwayne Charrington · Log in

wpDiscuz