在使用power shell運行cnpm時報錯
cnpm : 無法加載文件 C:\Users\hp\AppData\Roaming\npm\cnpm.ps1,因為在此系統上禁止運行腳本。有關詳細信息,請參閱 https:/go.microsoft.com/fwlink/?LinkID=135170 中的
about_Execution_Policies。
所在位置 行:1 字符: 1
cnpm install amfe-flexible
+ ~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
解決方法:
1.
以管理員身份運行power shell
2.
輸入set-ExecutionPolicy RemoteSigned
然后輸入A 回車
問題解決
————————————————
版權聲明:本文為CSDN博主「工大動車組」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/y_0232/java/article/details/102555209
