尝试使用npm i命令安装 npm 包时,出现以下异常:
我尝试重新安装节点 js 包并将代理设置为关闭使用:
set HTTP_PROXY=
set HTTPS_PROXY=
Run Code Online (Sandbox Code Playgroud)
问题仍然存在。我做错了什么?
更新:
当我运行以下命令时:
npm install --legacy-peer-deps
Run Code Online (Sandbox Code Playgroud)
I updated my angular to v9 and when I try to go back in v8, I receive this error. I have already tried the following:
This error continues to show.
My stacktrace is :
An unhandled exception occurred: Job name "..getProjectMetadata" does not exist.
See angular-errors.log for further details.
Run Code Online (Sandbox Code Playgroud)
angular-errors.log :
[error] Error: Job name "..getProjectMetadata" does not exist.
at Observable._subscribe (/Front/node_modules/@angular-devkit/core/src/experimental/jobs/simple-scheduler.js:350:23)
at Observable._trySubscribe …Run Code Online (Sandbox Code Playgroud) 我在新的 angular 项目设置中遇到以下错误。
错误 错误:未捕获(承诺):错误:您的应用程序或其依赖项之一似乎正在使用 i18n。Angular 9 引入了一个
$localize()需要加载的全局函数。请添加import '@angular/localize';到您的 polyfills.ts 文件中。错误:您的应用程序或其依赖项之一似乎正在使用 i18n。Angular 9 引入了一个$localize()需要加载的全局函数。
注意:我来自以下。它建议回退到旧版本。 https://github.com/angular/angular/issues/32508
我将所有 angular 库升级为angular 9.0.0using ng update,当我尝试构建它们时,出现以下错误。
错误:
不受支持的私有类 SomeComponent。此类通过 SomeModule -> SomeComponent 对消费者可见,但不会从顶级库入口点导出。
有人解决了这个错误吗?
当我尝试在我的项目中运行 ng serve 命令时,它会产生以下错误。
ngcc 中的错误已在 ID 为 xxxx 的进程中运行
使用 angular 9 和它的新编译引擎 IVY,我的 CI 构建时间大幅增加。这当然是因为ngcc它在许多模块上运行。
例如
Compiling @angular/core : es2015 as esm2015
Compiling @angular/common : es2015 as esm2015
...
Run Code Online (Sandbox Code Playgroud)
我以为ngcc缓存在编译的库node_modules,但我的node_modules缓存在我的CI工作,还有编的现象发生,所以这是不可能的。
我应该缓存什么路径以避免ngcc在每次构建时重新编译所有模块?
continuous-integration circleci angular angular-ivy angular9
我已将一个 Angular 库升级到 Angular 9。但是,当我尝试在另一个 Angular 9 项目中使用该库时,我收到如下错误:
目标入口点“mycomponents/entity-selector”缺少依赖项:
- mycomponents/shared-services
- mycomponents/spinner
- mycomponents/text-input
Run Code Online (Sandbox Code Playgroud)
包.json
{
"$schema": "../../../node_modules/ng-packagr/package.schema.json",
"name": "entity-selector",
"version": "0.0.0",
"ngPackage": {
"lib": {
"entryFile": "public_api.ts"
},
"dest": "../../../dist/mycomponents/entity-selector"
}
}
Run Code Online (Sandbox Code Playgroud)
这是一个次要终点,它使用其他也是次要终点的组件。
在库项目中,我是否需要在 ng-packgr 或其他地方定义依赖项?实体选择器组件的模块为其他组件导入相应的模块。这个问题从 Angular 9 开始就出现了。
预先感谢。
在Angular 9(使用 Bootstrap 4 和 Jquery 3.5.1)中。单击引导程序折叠按钮时,我在浏览器控制台而不是下拉菜单上收到错误消息。
我真的不知道错误究竟来自哪里。
Can't convert object to primitive value(zone-evergreen:171).
Uncaught Type Error: Cannot convert object to primitive value(zone-evergreen.js:171 )
at RegExp.test (<anonymous>)
at HTMLDivElement.<anonymous> (bootstrap.bundle.min.js:6)
at Function.each (jquery.min.js:2)
at S.fn.init.each (jquery.min.js:2)
at S.fn.init.a._jQueryInterface [as collapse] (bootstrap.bundle.min.js:6)
at HTMLDivElement.<anonymous> (bootstrap.bundle.min.js:6)
at Function.each (jquery.min.js:2)
at S.fn.init.each (jquery.min.js:2)
at HTMLButtonElement.<anonymous> (bootstrap.bundle.min.js:6)
at HTMLDocument.dispatch (jquery.min.js:2)
Run Code Online (Sandbox Code Playgroud) 升级到 angular 9 后出现此错误。我使用的是 Visual Studio 2019,带有 angular 的 ASP .NET 核心。即使我创建新项目并将 angular 更新为 9 版本,它也会停止工作。
页面响应的完整列表是:
TimeoutException:Angular CLI 进程没有在 0 秒的超时时间内开始侦听请求。检查日志输出以获取错误信息。Microsoft.AspNetCore.SpaServices.Extensions.Util.TaskTimeoutExtensions.WithTimeout(Task task, TimeSpan timeoutDelay, string message) Microsoft.AspNetCore.SpaServices.Extensions.Proxy.SpaProxy.PerformProxyRequest(HttpContext context, HttpClient httpClient, Task baseUriTask, CancellationToken applicationStoppingToken, bool proxy404s) Microsoft.AspNetCore.Builder.SpaProxyingExtensions+<>c__DisplayClass2_0+<b__0>d.MoveNext() Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
我的 package.json 是:
{
"name": "webapplication10",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build:ssr": "ng run WebApplication10:server:dev",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "9.0.0",
"@angular/cdk": "~9.0.0", …Run Code Online (Sandbox Code Playgroud) Terminal -
"WARNING in Invalid constructor parameter decorator in D:/New folder/SilverLife/node_modules/@angular/fire/fesm2015/angular-fire.js:
() => [
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
]
ERROR in getInternalNameOfClass() called on a non-ES5 class: expected
AngularFireModule to have an inner class declaration"
Run Code Online (Sandbox Code Playgroud)
angular9 ×10
angular ×8
npm ×2
angular-ivy ×1
angular8 ×1
angularfire ×1
angularjs ×1
asp.net-core ×1
bootstrap-4 ×1
c# ×1
circleci ×1
firebase ×1
localization ×1
typescript ×1