Web development basic and advance tutorial, php basic tutorial, laravel basic tutorial, React Native tutorial

Tuesday, September 7, 2021

How to fix error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system, (without security risk)?

0 comments
How to fix error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system, (without security risk)?


What's up guys, in this video session i will explain you how you can fix this error message in this tutorial.

Follow 

Error on terminal: nodemon.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.

I have a solution to fix the issue by this way

  1. Open Windows PowerShell with Run as Administrator
  2. Run this command: Set-ExecutionPolicy Unrestricted

That solves the issue, but this way the system shows Security Risk Warning. My question: Is there any other way to solve this without security risk? Target is to use nodemon.

For those who are not aware of how to solve this error using Windows PowerShell

  1. Open PowerShell (Run As Administrator)
  2. Check the current execution policy using this command
    Get-ExecutionPolicy
    # You should get 'Restricted'
  1. Run this command to make it 'Unrestricted'
    Set-ExecutionPolicy Unrestricted
  1. Check again whether execution policy changed by running this command
    Get-ExecutionPolicy
    # You should get 'Unrestricted'
  1. Now try to run nodemon on your project

    nodemon 'filename.js'







No comments:

Post a Comment