当前位置:网站首页>Yarn: unable to load file d:\programfiles\nodejs\yarn PS1, because running scripts is prohibited on this system
Yarn: unable to load file d:\programfiles\nodejs\yarn PS1, because running scripts is prohibited on this system
2022-07-06 17:31:00 【JackieDYH】
error message
yarn : Unable to load file D:\ProgramFiles\nodejs\yarn.ps1, Because scripts are not allowed to run on this system . For more information , see also https:/go.microsoft.com/fwlink/?LinkID=135170
Medium about_Execution_Policies.
The position of That's ok :1 character : 1
+ yarn run serve
+ ~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Terminal process “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command yarn run serve” Terminated , Exit code : 1.
The main reason is powershell The execution policy of prevented this operation
solve
stay powershell Command line
windows Run under *.ps1 Script (powershell Script for ) When , You need to set execution permissions
Carry out orders : set-ExecutionPolicy RemoteSigned # Remote signature
#Set-ExecutionPolicy Restricted # No execution is allowed ( The default option )
#Set-ExecutionPolicy Unrestricted # unlimited
# Parameters -Scope CurrentUser Valid only for current user
-----------------------------------------------------------------
Get-ExecutionPolicy
Get-ExecutionPolicy -Scope CurrentUser
边栏推荐
- Flink 解析(一):基础概念解析
- 案例:检查空字段【注解+反射+自定义异常】
- 手把手带你做强化学习实验--敲级详细
- Flink 解析(五):State与State Backend
- Flink parsing (V): state and state backend
- Redis快速入门
- PostgreSQL 14.2, 13.6, 12.10, 11.15 and 10.20 releases
- Precipitated database operation class - version C (SQL Server)
- 关于Selenium启动Chrome浏览器闪退问题
- Akamai anti confusion
猜你喜欢
随机推荐
Instructions for Redux
PostgreSQL 14.2, 13.6, 12.10, 11.15 and 10.20 releases
Koa Middleware
手把手带你做强化学习实验--敲级详细
MySQL Advanced (index, view, stored procedures, functions, Change password)
虚拟机启动提示Probing EDD (edd=off to disable)错误
07 personal R & D products and promotion - human resources information management system
自动答题 之 Selenium测试直接运行在浏览器中,就像真正的用户在操作一样。
06个人研发的产品及推广-代码统计工具
MySQL advanced (index, view, stored procedure, function, password modification)
[reverse intermediate] eager to try
Flink parsing (VII): time window
mysql的合计/统计函数
案例:检查空字段【注解+反射+自定义异常】
Flink parsing (V): state and state backend
全网最全tcpdump和Wireshark抓包实践
04个人研发的产品及推广-数据推送工具
Only learning C can live up to expectations top3 demo exercise
SQL调优小记
C version selenium operation chrome full screen mode display (F11)