1. npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
Plaintext
PS C:\wwwroot\phpMyAdmin> npm -v
npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ npm -v
+ ~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
2. Confirm that the file C:\Program Files\nodejs\npm.ps1 exists. See Figure 1.

3. Enter one of the following commands to change the execution policy, making a permanent change (effective for all sessions). See Figure 2.

Plaintext
PS C:\wwwroot\phpMyAdmin> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
PS C:\wwwroot\phpMyAdmin> npm -v
10.9.2
PS C:\wwwroot\phpMyAdmin>
