当前位置:网站首页>yarn : 无法加载文件 D:\ProgramFiles\nodejs\yarn.ps1,因为在此系统上禁止运行脚本
yarn : 无法加载文件 D:\ProgramFiles\nodejs\yarn.ps1,因为在此系统上禁止运行脚本
2022-07-06 09:35:00 【JackieDYH】
错误信息
yarn : 无法加载文件 D:\ProgramFiles\nodejs\yarn.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170
中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ yarn run serve
+ ~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
终端进程“C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command yarn run serve”已终止,退出代码: 1。

主要原因是powershell的执行策略阻止了此次操作
解决
在powershell命令行
windows下运行*.ps1脚本(powershell的脚本)的时候,需要设置执行权限
执行命令: set-ExecutionPolicy RemoteSigned #远程签名
#Set-ExecutionPolicy Restricted #不允许执行(默认选项)
#Set-ExecutionPolicy Unrestricted #无限制
#参数 -Scope CurrentUser 仅当前用户有效
-----------------------------------------------------------------
Get-ExecutionPolicy
Get-ExecutionPolicy -Scope CurrentUser边栏推荐
猜你喜欢
![[reverse] repair IAT and close ASLR after shelling](/img/83/1c77e24e9430fb7ea775169a794a28.png)
[reverse] repair IAT and close ASLR after shelling

Integrated development management platform

February database ranking: how long can Oracle remain the first?

Deploy flask project based on LNMP

Koa Middleware

1. JVM入门介绍

Serial serialold parnew of JVM garbage collector

05个人研发的产品及推广-数据同步工具

JVM类加载子系统

JVM之垃圾回收器下篇
随机推荐
Redis快速入门
C#WinForm中的dataGridView滚动条定位
Deploy flask project based on LNMP
Von Neumann architecture
C# WinForm系列-Button简单使用
Data transfer instruction
06 products and promotion developed by individuals - code statistical tools
PostgreSQL 14.2, 13.6, 12.10, 11.15 and 10.20 releases
03 products and promotion developed by individuals - plan service configurator v3.0
Junit单元测试
List set data removal (list.sublist.clear)
[reverse] repair IAT and close ASLR after shelling
Basic knowledge of assembly language
Ce n'est qu'en apprenant que c est à la hauteur des attentes Top5 s1e8 | s1e9: caractères et chaînes & opérateurs arithmétiques
Flink 解析(三):内存管理
Precipitated database operation class - version C (SQL Server)
手把手带你做强化学习实验--敲级详细
Only learning C can live up to expectations top5 S1E8 | S1E9: characters and strings & arithmetic operators
唯有學C不負眾望 TOP5 S1E8|S1E9:字符和字符串&&算術運算符
Flink 解析(六):Savepoints