• 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

  • Testing Event Listeners In Jest (Without Using A Library)
  • How To Get The Hash of A File In Node.js
  • Which Neural DSP Archetype Plugins Should You Buy?
  • Smoke Detector Randomly Goes Off Early Hours of The Morning
  • How To Mock uuid In Jest
  • Neural DSP Reveal Details About the Long-Awaited Quad Cortex Desktop Editor
  • Deno Raises $21M - but is anyone using it yet?
  • Web 3.0 may have died before it even started
  • NBN Box Installed Inside of Garage, Where Do You Put The Modem?
  • How To Decompile And Compile Android APK's On A Mac Using Apktool

Recent Comments

  • Jay on Neural DSP Reveal Details About the Long-Awaited Quad Cortex Desktop Editor
  • john on Deno Raises $21M – but is anyone using it yet?
  • Oranges on How To Store Users In Firestore Using Firebase Authentication
  • Precious on Fixing Sequel Pro SQL Encoding Error For Imported SQL Files
  • James on A List of WordPress Gutenberg Core Blocks

Copyright © 2022 · Dwayne Charrington · Log in

wpDiscuz