在vscode的控制台terminal中执行ps1脚本,可能会报错:
1
2
3
4
5
6
| flourish : 无法加载文件 C:\Users\demon\AppData\Roaming\npm\flourish.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ flourish new my_template
+ ~~~~~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
|
解决办法是:
- 进入
powershell - 执行
1
| set-ExecutionPolicy RemoteSigned
|
- 选
Y