当前位置:网站首页>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
边栏推荐
- Serial serialold parnew of JVM garbage collector
- Some feelings of brushing leetcode 300+ questions
- Flink 解析(四):恢复机制
- 唯有學C不負眾望 TOP5 S1E8|S1E9:字符和字符串&&算術運算符
- PySpark算子处理空间数据全解析(4): 先说说空间运算
- JVM garbage collector part 2
- Total / statistics function of MySQL
- Yum install XXX reports an error
- 沉淀下来的数据库操作类-C#版(SQL Server)
- 07 personal R & D products and promotion - human resources information management system
猜你喜欢
03 products and promotion developed by individuals - plan service configurator v3.0
Coursera cannot play video
Programmer orientation problem solving methodology
C# WinForm系列-Button简单使用
1. Introduction to JVM
Connect to LAN MySQL
Activiti directory (V) reject, restart and cancel process
02 personal developed products and promotion - SMS platform
Wu Jun trilogy insight (IV) everyone's wisdom
基于LNMP部署flask项目
随机推荐
JVM garbage collector part 2
Flink 解析(六):Savepoints
Assembly language addressing mode
Login to verify the simple use of KOA passport Middleware
Case: check the empty field [annotation + reflection + custom exception]
Set up the flutter environment pit collection
vscode
暑假刷题嗷嗷嗷嗷
arithmetic operation
Activit fragmented deadly pit
复盘网鼎杯Re-Signal Writeup
Akamai 反混淆篇
SQL调优小记
Idea breakpoint debugging skills, multiple dynamic diagram package teaching package meeting.
关于Stream和Map的巧用
Basic knowledge of assembly language
Jetpack compose 1.1 release, based on kotlin's Android UI Toolkit
Instructions for Redux
Flink 解析(五):State与State Backend
JVM class loading subsystem