วิธีแก้ไข : SecurityError: (:) [], PSSecurityException

Code Error

express : File C:\Users\ArcHeR\AppData\Roaming\npm\express.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.
At line:1 char:1
+ express --view=ejs myApp
+ ~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

เมื่อคุณเรียกใช้คำสั่งนี้ คุณจะเห็นว่าระบบของคุณได้ตั้งค่านโยบายทั้งหมดสำหรับผู้ใช้ปัจจุบันเป็นแบบระยะไกล จะใช้เวลาสองสามวินาทีในการดำเนินการนี้ให้เสร็จสิ้น รูปภาพจะแสดงดังด้านล่าง

set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Get-ExecutionPolicy

Get-ExecutionPolicy -list

ทดสอบคำสั่งว่าได้ไหม

ลองใช้คำสั่งเดิมดูผล ผลคือใช้งานได้ละครับ