"Vue: Could not load file D: \ nodejs \ node_global \ vue.ps1 , since the prohibition to run a script on this system" solution of the
original _Guardian_ Last post on 2020-03-17 20:14:25 reading number 539 Collection
launched
When using VS Code to directly create a vue project, the following error occurred, causing the creation to fail:
So follow the error prompt to check the cause of the error: it is because the PowerShell execution policy prevented the operation.
Use Get-ExecutionPolicy to check that the execution policy is restricted:
The solution is as follows:
1. Just remotely execute the execution policy: Open VS Code as an administrator (run as a normal user will give an error), and run the command in the terminal:
Set-ExecutionPolicy RemoteSigned
1
2. At this time, check the execution policy status with Get-ExecutionPolicy and display it as valid to solve the problem:
————————————————
Copyright Statement: This article is an original article of CSDN blogger "_Guardian_", following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement for reprint .
Original link: https://blog.csdn.net/Dreaming_/java/article/details/104929207