当前位置:网站首页>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 .
边栏推荐
- Ggplot2 displays png
- In depth understanding - wechat developer tools
- The difference between.Split (",", -1) and.Split (",")
- Codeworks 5 questions per day (average 1500) - day 23
- 分布式资源管理与任务调度框架Yarn
- Sword finger offer II 031. Least recently used cache
- Ardunio - ULN2003 drive board and DC motor fan - control fan speed
- Leetcode 70 climbing stairs, 199 right view of binary tree, 232 realizing queue with stack, 143 rearranging linked list
- How CAD draws arrows with arcs
- How to do a good job of accompanying translation
猜你喜欢

Build a CPU Simulator

原生组件、小程序与客户端通信原理、video、map、canvas、picker等运行原理

Use of component El scrollbar

Canvas drawing (mouse click to draw and lift to end)

餐饮连锁门店重塑增长背后的数字化转型

Understand the transport layer protocol - tcp/udp

ACM SIGIR 2022 | interpretation of selected papers of meituan technical team

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

奔走相告,行情与量化页面功能优化!股票量化分析工具QTYX-V2.4.5

NetApp FAS系列一个CIFS bug引起的控制器重启案例分享
随机推荐
Use the hiflow scene connector to view the epidemic situation in the region every day
Seatunnel architecture
The difference between.Split (",", -1) and.Split (",")
In depth understanding of the underlying framework of wechat applet (II) component system, exprser
Research and analysis of the third-party dependency library Ag grid
regular expression
Quick sort considerations
async await详解 & Promise
Detailed comparison between graphic array and linked list, performance test
Wenxin big model raises a new "sail", and the tide of industrial application has arrived
MySQL---four JDBC
Login with a third-party account
Jar package used by jsonarray in main function provided by leetcode
Mysql database authorization learning
认识传输层协议—TCP/UDP
[C language operation of linked list (initialization, establishment, length calculation, addition, deletion, and output of linked list)]
hdu-7141 Ball (bitset)
C -- bit operation
Hundred million financing events account for more than 30%. Where is the next stop for super automation? -- Manfu Technology
ASP.NET CORE写一个缓存Attribute工具