You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I am using Chinese Windows, I reproduced the situation in the sandbox.
Version
v22.14.0 (LTS)
Platform
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19041 N/A Build 19041
What steps will reproduce the bug?
After installing the node environment using the binary or msi installation package, executing npm -v in PowerShell will prompt 'npm.ps1' cannot be loaded because running scripts is disabled on this system.
in my sandbox machine:
The reason for this problem is that I upgraded node, but the node_modules such as yarn or vue installed globally before the upgrade are not affected.
in my host machine:
After the initial installation, my sandbox machine's PowerShell execution policy
Whether in the sandbox machine or the host machine, change the execution policy to Unrestricted to use npm
Version
22.13.1
Platform
Microsoft Windows NT 10.0.22621.0 x64
What steps will reproduce the bug?
在 PowerShell 运行 npm -v 会报 error
尝试过22.13.0和20.18.2都不会报错
运行 npm.cmd -v 能正常显示版本
How often does it reproduce? Is there a required condition?
必现
What is the expected behavior? Why is that the expected behavior?
应正常显示 npm 版本:10.9.2
What do you see instead?
Additional information
Environment:
OS: Windows 11
PowerShell Version: 5.1.22621.4391
Possible Causes:
怀疑新版本中 npm.ps1 文件可能:
缺少数字签名
文件哈希值不匹配
权限配置变更
建议检查:
对比 22.13.0 和 22.13.1 的 npm.ps1 文件差异
验证安装包的签名完整性
检查 Windows 系统日志中的相关安全事件
The text was updated successfully, but these errors were encountered: