我正在尝试将我的 angular 9 应用程序升级到 angular 10 版本,但在升级后低于警告
rxjs\BehaviorSubject.js depends on rxjs-compat/BehaviorSubject
Run Code Online (Sandbox Code Playgroud)
知道如何解决这个问题吗?
我正在尝试将我的 Angular 9 应用程序升级到 Angular 10 版本,但在升级后低于警告
WARNING in calendar.reducer.ts depends on lodash/keys. CommonJS or AMD dependencies can cause optimization bailouts.
Run Code Online (Sandbox Code Playgroud)
我已将以下行添加到我的angular.json文件中,但问题未解决
"allowedCommonJsDependencies": ["lodash"]
Run Code Online (Sandbox Code Playgroud)
我该如何解决上述问题。
我在将项目从 Angular 8.2.1 升级到 Angular 13 版本时遇到问题。
在准备构建时成功升级后,出现以下错误。
Data path "" must NOT have additional properties(extractCss).
Run Code Online (Sandbox Code Playgroud)
我已经在 angular.json 文件中重命名为styleext with style,但仍然无法找到此错误的根本原因。
angular.json 文件如下。
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"qiwkCollaborator": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
/* "configurations": {
"fr": {
"aot": true,
"outputPath": "dist/qwikCollaborator/fr/",
"i18nFile": "src/translate/messages.fr.xlf",
"i18nFormat": "xlf",
"i18nLocale": "fr",
"i18nMissingTranslation": "error"
},
"en": {
"aot": true,
"outputPath": "dist/qwikCollaborator/en/", …Run Code Online (Sandbox Code Playgroud) 最近我将 Angular 应用程序更新到版本 14,升级后,我收到以下错误。错误如下
\n./src/assets/vendor/default/styles.scss - Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):\nSassError: Can't find stylesheet to import.\n \xe2\x95\xb7\n4 \xe2\x94\x82 @import "~src/vendor/libs/ng2-nouislider/mixins";\nRun Code Online (Sandbox Code Playgroud)\n有人可以帮助解决这个问题吗?
\n提前致谢
\n我有一个Angular/AngularJS升级应用程序,目前正在将所有内容从AngularJS迁移到Angular.这是一个相当大的项目,所以我绝对需要采用升级方式.
我使用@ uirouter/angular-hybrid并且具有仍然是AngularJS(导航和东西)的根状态和子视图.在这个子视图中,我现在正在慢慢地将所有组件升级到Angular.出于性能原因,我不得不使用downgradeModule()(https://angular.io/guide/upgrade-performance)而不是UpgradeModule.
对于UI组件,我使用Angular Material 2.
这么多的设置,现在问题/问题:
当带有页面的选项卡在后台并且您稍后返回该页面时(至少5到10分钟),整个页面都会滞后并且没有响应.您离开的时间越长,标签位于背景中,滞后时间越长.
我已经尝试/发现的内容:

ngZone: 'noop'无效我目前正在开发一个干净的示例应用程序来重现问题,并为进一步测试提供更多背景信息.我很快就会添加它.
Angular:6.1.0
AngularJS:1.7.2
zone.js:0.8.26
@ uirouter/angular-hybrid:6.0.0
我们有一个Angular 4我最近尝试升级到的项目Angular 8。我遵循了Angular网站上的迁移指南,更改了某些语法,并且阻止了项目的构建。我遇到了我的样式无法在本地正确加载并且根本不在Azure上加载的问题。我找到Webpack并尝试配置它,添加了style-loader,sass-loader和css-loader。现在,当我在本地运行时,可以在浏览器的“网络”选项卡中看到所有样式均已正确加载,但它仅加载默认的index.html文件,而没有引导应用程序。
当我在Azure上部署应用程序时,它会加载其他组件,但是没有一种样式会加载。我花了3周的时间进行迁移,但仍然没有希望。
工具/插件版本:
Angular CLI: 8.3.5
Node: 10.15.1
OS: win32 x64
Angular: 8.2.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.5
@angular-devkit/build-angular 0.803.5
@angular-devkit/build-optimizer 0.803.5
@angular-devkit/build-webpack 0.803.5
@angular-devkit/core 8.3.5
@angular-devkit/schematics 8.3.5
@angular/cdk 8.2.0
@angular/cli 8.3.5
@angular/http 5.2.11
@angular/material 8.2.0
@ngtools/webpack 8.3.5
@schematics/angular 8.3.5
@schematics/update 0.803.5
rxjs 6.5.3
typescript 3.5.3
webpack 4.40.2Run Code Online (Sandbox Code Playgroud)
这是我的Webpack配置:
const { resolve } = require('path');
const rxPaths = …Run Code Online (Sandbox Code Playgroud)webpack webpack-style-loader angular-upgrade angular angular8
我正在将AngularJS项目迁移到Angular 5,ngUpgrade但是当我尝试在我的一个新组件中注入AngularJS服务时遇到了问题.
我按照Angular的升级指南创建了一个使用$injector(参见下面的代码)的serviceProvider,但是我一直收到这个错误:
core.js:1449 ERROR错误:未捕获(在承诺中):错误:在设置之前尝试获取AngularJS注入器.
我怀疑我需要用forwardRef某个地方来解决这个问题,但我无法找出方法和地点(以及为什么).
按照升级指南的示例,我创建了一个serviceProvider,如下所示:
AJS升级,providers.ts:
// The AngularJS service I want to use
import { AuthenticationService } from '../ajs/services/authentication.service';
export function authenticationServiceFactory($injector) {
return $injector.get('authentication');
}
export const authenticationServiceProvider = {
provide: AuthenticationService,
useFactory: authenticationServiceFactory,
deps: ['$injector']
};
Run Code Online (Sandbox Code Playgroud)
然后我将它提供给应用程序的NgModule:
app.module.ts:
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
UpgradeModule,
],
providers: [
authenticationServiceProvider,
],
bootstrap: [
AppComponent,
],
})
export class AppModule {
}
Run Code Online (Sandbox Code Playgroud)
我使用ngUpgrade引导该模块:
main.ts
import { platformBrowserDynamic …Run Code Online (Sandbox Code Playgroud) 我正在关注此网站并尝试通过以下命令将我的项目更新到 11.0。
npx @angular/cli@11 update @angular/core@11 @angular/cli@11
Run Code Online (Sandbox Code Playgroud)
每次我运行它时,都会出现以下错误:
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: my-first-app@0.0.0
npm ERR! Found: @angular-devkit/build-angular@0.1002.4
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~0.1102.17" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @angular-devkit/build-angular@"~0.1102.17" from the root project
npm ERR! Conflicting peer dependency: @angular/compiler-cli@11.2.14
npm ERR! node_modules/@angular/compiler-cli
npm ERR! peer @angular/compiler-cli@"^11.0.0 || ^11.2.0-next" from @angular-devkit/build-angular@0.1102.17
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~0.1102.17" from the …Run Code Online (Sandbox Code Playgroud) 我正在尝试将 Angular 项目(版本 8)更新到版本 9。运行 ng update 时出现错误:
Migration failed: Could not find any tsconfig file. Cannot migrate dynamic queries.
Run Code Online (Sandbox Code Playgroud)
一段时间后。但当检查版本时,它显示为 9。但许多所需的更改都不存在。
任何解决方案或解决方法表示赞赏。
我已将我的 Angular 项目从 6.0v 升级到 14.2.2v,并在执行ngserve之后后,我面临以下错误。我尝试删除 node_modules 并再次安装,我还尝试安装最新的 @angular-devkit/build-angular 但它不起作用。
我面临的错误
Initial Chunk Files | Names | Raw Size | Estimated Transfer Size
runtime.js | runtime | 1.25 kB | 670 bytes
4 unchanged chunks
Build at: 2022-09-16T13:27:09.170Z - Hash: ab7f7874267f0b08 - Time: 18413ms
./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Emit attempted before Angular Webpack plugin initialization.
./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Emit attempted before Angular Webpack plugin initialization.
Error: …Run Code Online (Sandbox Code Playgroud) angular ×10
angular-upgrade ×10
javascript ×3
angular10 ×2
angularjs ×2
webpack ×2
angular13 ×1
angular8 ×1
node-sass ×1
npm-install ×1
npm-update ×1
rxjs ×1
rxjs6 ×1
sass ×1
tsconfig ×1