• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
WebSetNet

WebSetNet

Technology News

  • Technology News
    • Mobile
    • Games
  • Internet Marketing
  • System Admin
    • Windows 11
    • Linux
    • Mac & Apple
    • Website Scripts
      • Wordpress

Fix Unable to Run Yarn in Windows Terminal – PowerShell

June 21, 2021 by jerry23

If you run into an error with your brand new machine when trying to run any custom scripts like npm, yarn or any node modules you might run into an error similar to below.

yarn : File C:Program Filesnodejsyarn.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. 

At line:1 char:1 + yarn + ~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess

To fix it, open PowerShell as administrator, again make sure to run this in PowerShell, not with the regular command prompt (cmd). Copy and paste the code below and run it.

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

This will grant you the necessary permission to run any executable scripts in your PC’s terminal. You only have to do this once and any future yarn or npm commands will run successfully.

Hope this helps with your quick tip on solve why yarn or npm not running on your PC. The same will be true for Ruby’s bundler to manage gems, or Python’s pip package manager.

The post Fix Unable to Run Yarn in Windows Terminal – PowerShell appeared first on Next of Windows.

Related posts:

  1. Using Yarn on Ubuntu and Other Linux Distributions
  2. The ultimate guide to fixing problems with the May 2020 Update
  3. PowerShell Core 6.0 and Why Windows PowerShell Is No Longer Being Developed
  4. Fix – INVALID_DATA_ACCESS_TRAP BSOD Error in Windows 10
  5. MSI GeForce RTX 3090 SUPRIM X & RTX 3080 SUPRIM X Graphics Cards Review – Premium Design & Everything Else!
  6. Using Windows PowerShell Modules in PowerShell 7
  7. NVIDIA GeForce RTX 2070 8 GB GDDR6 Graphics Card Review FT. MSI Armor X & ASUS ROG STRIX
  8. How To Fix Kodi “Update Failed” Error
  9. Full Fix: Microsoft Edge window position issues
  10. 40 Clever 404 Error Pages From Real Websites

Filed Under: Windows 11 Tagged With: PowerShell, terminal, unable, windows, yarn

Primary Sidebar

Trending

  • 5 Ways to Fix “Your SIM sent a Text Message” Issue on iPhone
  • 3 Ways to Disable GetApps on Xiaomi, Redmi, and Poco Phones Running MIUI
  • 8 Best Sites to Read Manga Online for Free
  • How To Extract & Install tar.gz Files In Ubuntu
  • How to Highlight Duplicates in Google Sheets
  • GeForce Experience not finding games? Fix it fast
  • How to find a lost Apple Pencil using your iPad (1st and 2nd gen)
  • Discord Stream Has No Sound? 6 Ways to Fix
  • Troubleshooting “E: Unable to locate package” Error on Ubuntu [Beginner’s Tutorial]
  • Exclamation Mark on Network Signal, Mobile Data Not Working? 8 Ways to Fix
  • How to Track a Stolen or Lost Nintendo Switch
  • How to Fix YouTube Server Connection Error [400] on Android
  • How To Calculate CAGR in Excel
  • How to check if your Android device supports Widevine DRM
  • What is Android System Intelligence, and why is it on your phone?
  • 17 Cool Arduino Project Ideas for DIY Enthusiasts
  • How to Make Any Wired Printer Wireless in 6 Different Ways
  • How to Change the Last Modified Date, Creation Date, and Last Accessed Date for Files and Folders

Footer

Tags

Amazon android Apple Asus available download: edge feature features first free from galaxy Game games gaming gets google install Intel iPhone launches linux Microsoft more OnePlus phone release released review: samsung series support this Ubuntu update using video watch what will windows with xbox your

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org