A little problem encountered by nodemon when learning ajax

nodemon: Unable to load the file C:\Users\xxx\AppData\Roaming\npm\nodemon.ps1 because running scripts is prohibited on this system. For more information, see a bout_Execution_Policies in https:/go.microsoft.com/fwlink/?LinkID=135170.

Error description: When doing exercises with express and ajax based on node.js, in order to avoid always restarting the js terminal, nodemon is introduced. The installation is relatively simple. You can directly enter a command in the terminal "npm install -g nodemon", After the installation, I restarted and found that there was a problem, as shown in the figure.
Insert picture description here
After searching the information, I found that the notebook was forbidden to run scripts. Solution
1. Open powerShell as an administrator

2. Enter set-ExecutionPolicy RemoteSigned
Insert picture description here
and then enter powerShell
and then enter set-ExecutionPolicy RemoteSigned
so that the problem is solved
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41880073/article/details/114376571