当前位置:网站首页>VSCode【因为在此系统上禁止运行脚本】
VSCode【因为在此系统上禁止运行脚本】
2022-07-15 17:27:00 【hzxOnlineOk】
错误
在vscode终端运行create-react-app脚手架报错:

原因排查
计算机上启动 Windows PowerShell 时,执行策略为 Restricted(默认设置)。Restricted 执行策略不允许任何脚本运行。RemoteSigned 执行策略可防止 Windows PowerShell 运行没有数字签名的脚本。
解决方案
方案一(如果方案一不生效,请尝试方案二或三)
右键选择vscode,点击属性,选择兼容性,勾选以管理员身份运行此程序。
方案二
在vscode的TERMINAL执行命令窗口输入以下命令查看配置
get-executionpolicy
再输入以下命令设置策略
set-executionpolicy remotesigned
方案三
计算机上启动 Windows PowerShell,修改执行策略为RemoteSigned (默认设置是Restricted)
参考:https://blog.csdn.net/VXadmin/article/details/120934671
查看是否生效
重新打开vscode,打开终端执行下面2个命令
get-ExecutionPolicy // 查看执行策略
set-ExecutionPolicy RemoteSigned // 设置执行策略
边栏推荐
- Markdown in CSDN sets the width of table columns
- 2022年期货开户哪家最好?开户费用最低?最安全?
- Procédure d'essai de pénétration
- mysql中 decimal(10,2)格式的通过stream 方式写到 kafka 变成 stri
- MySQL trigger
- Numpy gets a row and a column of a two-dimensional array
- DevSecOps研发安全实践——设计篇
- 记录Yolov5的使用(1)
- Devsecops R & D security practice - Design
- HTAP能力加速TPC-H执行前要怎么部署PolarDB for PostgreSQL?
猜你喜欢

consul启动闪退

Things about the client (2)

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the

【示波器的基本使用】以及【示波器按键面板上各个按键含义的介绍】

AES encryption learning of openharmony security module

Intel releases open source AI Reference Suite

MODBUS-RS485布线的8条准则

2、趋势科技2017校招开发岗试题

实现浏览器 - Servlet - 数据库交互操作

来自JRockit的礼物:JMC虚拟机诊断工具
随机推荐
ASP.NET里的Session详细解释
C language: code specification Discussion & excerpts (including excerpts from some rules of [Huawei code specification])
如何使用HHDBCS对PolarDB for PostgreSQL存储过程进行调试?
【森城市】GIS数据漫谈(四)— 坐标系统
时间复杂度和空间复杂度详解
C语言:代码规范浅谈&摘录(包含【华为代码规范】部分规则摘录)
Firewall ha configuration
实现浏览器 - Servlet - 数据库交互操作
Openharmony module 2 file samgr_ Server resolution (1)
美团一面面经及详细答案
如何制作sitemaps网站地图
福赛生物解读2022上半年大气环境变化,VOCs治理依然是破局关键
Probability meditation: 1 Plausible reasoning
redHat7.9配置yum源
使用 SSH 方式拉取代码
JVM调优命令大全及常用命令工具和实战步骤
实现一下几个简单的loader
The characteristics and underlying principles of synchronized, as well as the state and expansion and upgrading process of locks
@Repository @[email protected] 注解的理解
OpenHarmony模块二下文件samgr_server解析(3)