Problem:
Using vscode’s built-in integrated terminal, after entering the command cnpm run dev, an error is reported: The file cannot be loaded... Because on this system Disable running scripts [Powershell]
The solution is as follows:
Open console mode, option View -> Terminal
Powershell command line solution:
(1) Run vscode
as administrator (2) Query Powershell detailed policy, execute: get-ExecutionPolicy in the terminal, Restricted (forbidden status)
is displayed (3) Update Powershell policy, Execute in the terminal: set-ExecutionPolicy RemoteSigned
(4) Query the policy status again, execute in the terminal: get-ExecutionPolicy, display RemoteSigned
and update the execution policy to allow the use of scripts. Fix "Scripting is prohibited on this system" issue!
Recommended related articles and tutorials: vscode tutorial
The above is the detailed content of vscode console error: Unable to load file. For more information, please follow other related articles on the PHP Chinese website!