当我尝试在 VS Code 终端上运行 ionic 命令时ionic serve,出现以下错误。
我怎样才能解决这个问题?
ionic : File C:\Users\Lakshan\AppData\Roaming\npm\ionic.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
+ ~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Run Code Online (Sandbox Code Playgroud) 我正在尝试在Windows 10in上编译一个项目Visual Studio Code,我的设置如下:
1)npm版本6.12
2)Node.js版本12.13
3) Angular CLI: 8.3.19
我的问题是,当我尝试运行ng serve我收到以下输入:ng : File C:\Users\name\AppData\Roaming\npm\ng.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.
到目前为止我尝试过的
1)我访问了网站,发现Set-ExecutionPolicy -ExecutionPolicy RemoteSigned应该是我必须在shell中输入的命令。因此,我所做的是:
PS C:\Users\raggi\OneDrive\Desktop\pitalkdashboard> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
但这导致了以下错误:
Set-ExecutionPolicy : Access to the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell is denied. To change the execution policy for the default (LocalMachine) scope, …
我想知道 node_modules 文件夹到底是什么以及用于什么。我知道当我们使用 npm 下载任何库时,该库会转到 node_modules,但我知道当我们要将其上传到 github 时,我们必须忽略 node_modules 文件夹,因为它占用大量空间。通过 package.json 我们可以使用 npm i 下载所有依赖项,我的问题是...假设我想将我的应用程序/网站部署到某个服务器/主机,我是否也必须将 node_modules 文件夹上传到服务器?另一件事,通常我从网站下载我的 jquery 和 bootstrap 并复制到我的项目内的 css/js 文件夹中,但是这次我尝试使用 npm 并且一切都转到 node_modules 并且我使用的是cordova,当我执行命令cordova时build 既不生成我的 jquery 也不生成我的引导程序。所以这就是我的问题,如果我想主持我的项目,我真的必须上传 node_modules 吗?当它是cordova或ionic时,我还必须将node_modules复制到www文件夹吗?如果是,那么使用 npm 下载库有什么意义?这是真的吗?哪一个更好?去网站下载文件并粘贴到 www 或通过 npm 下载?
node.js ×2
powershell ×2
angular ×1
bootstrap-4 ×1
electron ×1
jquery ×1
node-modules ×1
npm ×1
npm-start ×1