当前位置:网站首页>Enter cnpm -v and cnpm appears: the file c:\users\19457\appdata\roaming\npm\cnpm.ps1 cannot be loaded because running scripts is prohibited on this system.
Enter cnpm -v and cnpm appears: the file c:\users\19457\appdata\roaming\npm\cnpm.ps1 cannot be loaded because running scripts is prohibited on this system.
2022-07-24 02:19:00 【Lemon sparkling water~】
It's finished today cnpm, Check the version with the following errors :
cnpm : Unable to load file C:\Users\19457\AppData\Roaming\npm\cnpm.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_Execu
tion_Policies.
The position of That's ok :1 character : 1
+ cnpm -v
+ ~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess

terms of settlement :
1、windows+r Input PowerShell
2、 Input set-ExecutionPolicy RemoteSigned enter 
3、 According to the prompt , Input A, enter
4、 Input again get-ExecutionPolicy Until we see RemoteSigned It was successful .
If the first 2 Enter “ set-ExecutionPolicy RemoteSigned” The error reported by entering is as follows :
set-ExecutionPolicy : For registry keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell” Of
Access denied . To change the default (LocalMachine) Execution strategy of scope , Please use “ Run as administrator ” Option to start the Windows PowerShell. To change when
The execution strategy of the former user , Please run "Set-ExecutionPolicy -Scope CurrentUser".
The position of That's ok :1 character : 1
+ set-ExecutionPolicy RemoteSigned
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyComma
nd

terms of settlement :
1、 Enter... At the prompt Set-ExecutionPolicy -Scope CurrentUser
After returning , Input remotesigned

2、 Input Y

3、 Input again get-executionpolicy see Whether to remove the restriction
Show RemoteSigned According to successful

ps: It's not just cnpm command , Include pnpm、yarn Wait for these orders , If the execution , Report such a mistake , Can be solved by this method . Premise is , If it is to use npm Command to install these CLI Command tool , Must be installed in the global environment , To take effect .
边栏推荐
- Understand the transport layer protocol - tcp/udp
- Magazine feature: the metauniverse will reshape our lives, and we need to make sure it gets better
- [untitled]
- Idea's gradle project Chinese garbled
- Login with a third-party account
- STM32 installation tutorial and j-link burning driver installation tutorial [the next day]
- Graduation design campus information publishing platform website source code
- Digital transformation behind the reshaping growth of catering chain stores
- Study and use of burpsuite plug-in
- Research on XMPP service (I)
猜你喜欢

Distributed resource management and task scheduling framework yarn

On Domain Driven Design

Ora-12899 error caused by nchar character

WordPress website SEO complete tutorial

【MySQL】字符集utf8mb4无法存储表情踩坑记录
![[C language] preprocessing details](/img/c3/861165ce20c135f4feedee1f112261.png)
[C language] preprocessing details

Try to run this command from the system terminal Make sure that you use the correct

新红包封面平台可搭建分站独立后台的源码

Mysql database UDF authorization learning

Summary of the first change to open source middleware keycloak
随机推荐
How to do a good job of accompanying translation
The difference between.Split (",", -1) and.Split (",")
Share two interesting special effects
Understand the transport layer protocol - tcp/udp
Express operates mysql. What is wrong with the SQL?
CANopen communication - PDO and SDO
[C language operation of linked list (initialization, establishment, length calculation, addition, deletion, and output of linked list)]
In depth understanding of the underlying framework of wechat applet (II) component system, exprser
MySQL---four JDBC
ASP.NET CORE写一个缓存Attribute工具
Using tessellation in unity
[MySQL] character set utf8mb4 cannot store the record of expression stepping on the pit
LoadRunner12安装、录制第一个脚本以及代理服务器没有响应解决
Chapter 9.2 program control of MATLAB
杂志特稿:元宇宙将重塑我们的生活,我们要确保它变得更好
What is naked SQL? What middleware or plug-in is good for express to operate MySQL?
145-keep-alive的初步使用
深入理解微信小程序的底层框架(二)组件系统、Exparser
Construction and test of hfish honey pot
Diablo king, analysis of low illumination image enhancement technology