NodeJS Execution Policy Error
If you get execution policy errors when you try to run node commands on Windows 11 or later, here's how you can fix it:
- Run the PowerShell terminal as the Administrator. To do this you can follow these steps:
- Click on the Windows Start Button
- Type 'powershell'
- When you see the PowerShell icon appear in the Start menu, right click on it and choose Run as administrator...
- Enter this command in the PowerShell terminal: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- You'll need to close the terminal that you were using when you first encountered the error and re-open it. So if you were trying to run the node program in VSCode, you should close and re-open it before trying again.
https://stackoverflow.com/questions/63423584/how-to-fix-error-nodemon-ps1-cannot-be-loaded-because-running-scripts-is-disabl