当前位置:网站首页>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边栏推荐
猜你喜欢

【逆向中级】跃跃欲试

Final review of information and network security (full version)

Learn the wisdom of investment Masters

Models used in data warehouse modeling and layered introduction

Flink analysis (II): analysis of backpressure mechanism

基于LNMP部署flask项目

Flink 解析(三):内存管理

网络分层概念及基本知识

1. Introduction to JVM

Deploy flask project based on LNMP
随机推荐
JVM garbage collector part 1
CentOS7上Redis安装
Flink 解析(四):恢复机制
List集合数据移除(List.subList.clear)
關於Stream和Map的巧用
05个人研发的产品及推广-数据同步工具
06个人研发的产品及推广-代码统计工具
Connect to LAN MySQL
Flink parsing (IV): recovery mechanism
连接局域网MySql
当前系统缺少NTFS格式转换器(convert.exe)
Koa Middleware
JVM 垃圾回收器之Garbage First
Flink 解析(五):State与State Backend
How does wechat prevent withdrawal come true?
吴军三部曲见识(四) 大家智慧
02 personal developed products and promotion - SMS platform
07个人研发的产品及推广-人力资源信息管理系统
沉淀下来的数据库操作类-C#版(SQL Server)
Only learning C can live up to expectations top3 demo exercise