多年来我一直愉快地使用 vscode/angular/node/npm ,没有出现任何问题。突然在最后一个小时左右,没有明确更改任何内容,我收到以下错误。
先前存在的执行权限突然丢失的最可能原因是什么?
我不想提前说这些,但对于那些无法理解的人,我并不是在问如何修复错误。我问为什么我的权限被擦除导致它出现。
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\d> cd C:\source\my-WebApp
PS C:\source\my-WebApp> ng serve
ng : File C:\Users\d\AppData\Roaming\npm\ng.ps1 cannot be loaded. The file
C:\Users\d\AppData\Roaming\npm\ng.ps1 is not digitally signed. You cannot run this script on the current system.
For more information about running scripts and setting execution policy, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ ng serve
+ ~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException …
Run Code Online (Sandbox Code Playgroud) 我最近开始使用电子.我通过创建一个hello world app(包含文件index.html,main.js,package.json)成功完成了第一阶段.现在我正在尝试使用电子打包器打包应用程序,但收到此错误
我遵循的步骤:
npm init
命令初始化项目目录.npm install electron --save-dev
.npm start
执行应用程序.npm install electron-packager
.electron-packager .
ng : File C:\Users\Lenovo\AppData\Roaming\npm\ng.ps1 cannot be loaded. The file C:\Users\Lenovo\AppData\Roaming\npm\ng.ps1 is not digitally signed. You cannot run
this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ ng serve
+ ~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Run Code Online (Sandbox Code Playgroud)
在给 ng 服务时显示此错误..如何克服它?
嗨我需要启用/禁用Cleartype(或"调整Windows的外观和性能>屏幕字体的平滑边缘")通过cmd(或任何脚本,如VBS/JS)或从注册表无需注销或Windows重新启动.
可能只为一个应用程序启用ClearType
谢谢
我开始使用 Visual Studio Code 进行 Powershell 脚本编写。我想关闭对未签名代码的检查,但不知道如何执行此操作。我也没有在论坛上找到任何东西。
我正试图在我的Windows笔记本电脑上启动Cassandra,我看到以下错误:
WARNING! Powershell script execution unavailable
Please use 'powershell Set-ExecutionPolicy Unrestricted'
on this user-account to run cassandra with fully featured
functionality on this platform.
Starting with legacy startup options
Starting Cassandra Server
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Run Code Online (Sandbox Code Playgroud)
所以我打开Powershell尝试将ExecutionPolicy设置为Unrestricted,我得到以下内容:
所以我按照错误中描述的注册表项进行操作,似乎密钥已经正确设置.我只是缺少一些明显的东西吗?以前版本的Cassandra在我的机器上完美运行,但自从我更新以来,这给了我各种各样的问题.
当我遇到这个问题时,那时我已经尝试从 Pwershell 触发此命令,无论是管理员还是非管理员
得到这个错误:
''' ng :无法加载文件 C:\Users\vishi\AppData\Roaming\npm\ng.ps1,因为在此系统上禁用运行脚本。有关详细信息,请参阅 https://go.microsoft.com/fwlink/?LinkID=135170 上的 about_Execution_Policies。行:1 字符:1
然后我尝试从 CMD 运行,因为此问题是由于 Powershell 上应用的安全策略造成的,然后 CMD 显示此错误:
'''新命令需要在项目外部运行,但在 C:\Users\vishi\ImprovApp\angular.json 中找到了项目定义”。'''
我的问题是,如果我们不是管理组的一部分,那么我们无法更改 PS 安全策略,那么还有其他方法可以运行 nodejs Ng 或 npm 命令吗???
我按照MS说明下载并安装了Azure Powershell:https: //azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/
使用Windows Powershell ISE我运行命令:
登录-AzureRmAccount
返回错误:
Login-AzureRmAccount : The 'Login-AzureRmAccount' command was found in the module 'AzureRM.Profile', but the module could not be loaded. For more information, run 'Import-Module AzureRM.Profile'. At line:1 char:1
+ Login-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Login-AzureRmAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
Run Code Online (Sandbox Code Playgroud)
导入模块AzureRM.Profile
返回此错误:
Import-Module : File C:\Program Files (x86)\Microsoft
SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile\CheckVersions.ps1 cannot be loaded
because running scripts is disabled on this system. For more information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At …
Run Code Online (Sandbox Code Playgroud) 我正在尝试运行 nodemon,但是当我这样做时,它会出现以下错误:
nodemon : File C:\Users\dyzha\AppData\Roaming\npm\nodemon.ps1 cannot
be loaded because running scripts is disabled on this system. For
more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ nodemon app.js
+ ~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityExcep
tion
+ FullyQualifiedErrorId : UnauthorizedAccess
Run Code Online (Sandbox Code Playgroud)
我已经尝试卸载它并重新安装它,npm install -g nodemon
并且npm install nodemon --save-dev
。
我正在使用 Windows PowerShell。但是,我不知道为什么,当我尝试激活 python 虚拟环境时,出现此错误:
venv\Scripts\activate : File C:\Users\Dell\Desktop\flask\microblog\venv\Scripts\Activate.ps1
cannot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ venv\Scripts\activate
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Run Code Online (Sandbox Code Playgroud)
这是我运行的命令:
venv\Scripts\activate
Run Code Online (Sandbox Code Playgroud)
这是第一次发生。问题是什么?
powershell ×5
angular ×2
npm ×2
windows ×2
angular-cli ×1
azure ×1
cassandra ×1
cleartype ×1
command-line ×1
electron ×1
javascript ×1
nodemon ×1
registry ×1
windows-7 ×1