File C:\Users\Tnluser\AppData\Roaming\npm\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.

solution>>>

The error message you are getting means that the Nodemon script file is blocked from running on your system because the PowerShell execution policy is set to Restricted.

To fix this, you need to change the PowerShell execution policy to Allow local scripts to run without signing. You can do this by following these steps:

  1. Open PowerShell as administrator.
  2. Run the following command:

Set-ExecutionPolicy RemoteSigned

  1. If prompted, type Y to confirm the change.

Once you have changed the PowerShell execution policy, you should be able to start your Node.js application using the nodemon command.

Here is an example of how to start an Express.js server using Nodemon:

nodemon app.js

Nodemon will then start watching your application files and restart your application whenever they change.

Note: If you are not familiar with PowerShell, you can also change the execution policy using the Group Policy Editor. To do this, follow these steps:

  1. Open the Run dialog box by pressing Windows + R.
  2. Type gpedit.msc and press Enter.
  3. In the Group Policy Editor, navigate to the following path:

User Configuration > Administrative Templates > Windows Components > Windows PowerShell

  1. Double-click the Turn on Script Execution policy.