Skip to content

Commit 004dc2b

Browse files
chore: upgrade to angular v17
1 parent 6a464ea commit 004dc2b

File tree

15 files changed

+5621
-4699
lines changed

15 files changed

+5621
-4699
lines changed

angular.json

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
"builder": "@angular-devkit/build-angular:browser",
1313
"options": {
1414
"aot": true,
15+
"allowedCommonJsDependencies": ["prismjs"],
1516
"outputPath": "dist",
1617
"index": "src/index.html",
1718
"main": "src/main.ts",
1819
"tsConfig": "src/tsconfig.app.json",
19-
"polyfills": "src/polyfills.ts",
20+
"polyfills": ["zone.js"],
2021
"assets": [
2122
"src/assets",
2223
"src/favicon.ico",
@@ -26,9 +27,7 @@
2627
"src/mstile-150x150.png",
2728
"src/_redirects"
2829
],
29-
"styles": [
30-
"src/styles.scss"
31-
]
30+
"styles": ["src/styles.scss"]
3231
},
3332
"configurations": {
3433
"production": {
@@ -67,51 +66,41 @@
6766
"serve": {
6867
"builder": "@angular-devkit/build-angular:dev-server",
6968
"options": {
70-
"browserTarget": "docs.nestjs.com:build"
69+
"buildTarget": "docs.nestjs.com:build"
7170
},
7271
"configurations": {
7372
"production": {
74-
"browserTarget": "docs.nestjs.com:build:production"
73+
"buildTarget": "docs.nestjs.com:build:production"
7574
}
7675
}
7776
},
7877
"extract-i18n": {
7978
"builder": "@angular-devkit/build-angular:extract-i18n",
8079
"options": {
81-
"browserTarget": "docs.nestjs.com:build"
80+
"buildTarget": "docs.nestjs.com:build"
8281
}
8382
},
8483
"test": {
8584
"builder": "@angular-devkit/build-angular:karma",
8685
"options": {
8786
"main": "src/test.ts",
8887
"karmaConfig": "./karma.conf.js",
89-
"polyfills": "src/polyfills.ts",
88+
"polyfills": ["zone.js"],
9089
"tsConfig": "src/tsconfig.spec.json",
91-
"styles": [
92-
"src/styles.scss"
93-
],
94-
"assets": [
95-
"src/assets"
96-
]
90+
"styles": ["src/styles.scss"],
91+
"assets": ["src/assets"]
9792
}
9893
},
9994
"lint": {
10095
"builder": "@angular-devkit/build-angular:tslint",
10196
"options": {
102-
"tsConfig": [
103-
"src/tsconfig.app.json",
104-
"src/tsconfig.spec.json"
105-
],
106-
"exclude": [
107-
"**/node_modules/**"
108-
]
97+
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
98+
"exclude": ["**/node_modules/**"]
10999
}
110100
}
111101
}
112102
}
113103
},
114-
"defaultProject": "docs.nestjs.com",
115104
"schematics": {
116105
"@schematics/angular:component": {
117106
"prefix": "app",

content/faq/errors.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ If you run across this error while developing, take a look at the module mention
2929
If the `<unknown_token>` above is `dependency`, you might have a circular file import. This is different from the [circular dependency](/faq/common-errors#circular-dependency-error) below because instead of having providers depend on each other in their constructors, it just means that two files end up importing each other. A common case would be a module file declaring a token and importing a provider, and the provider import the token constant from the module file. If you are using barrel files, ensure that your barrel imports do not end up creating these circular imports as well.
3030

3131
If the `<unknown_token>` above is `Object`, it means that you're injecting using an type/interface without a proper provider's token. To fix that, make sure that:
32-
1. you're importing the class reference or use a custom token with `@Inject()` decorator. Read the [custom providers page](/fundamentals/custom-providers), and
33-
2. for class-based providers, you're importing the concrete classes instead of only the type via [`import type ...`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) syntax.
32+
33+
1. you're importing the class reference or use a custom token with `@Inject()` decorator. Read the [custom providers page](/fundamentals/custom-providers), and
34+
2. for class-based providers, you're importing the concrete classes instead of only the type via [`import type ...`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) syntax.
3435

3536
Also, make sure you didn't end up injecting the provider on itself because self-injections are not allowed in NestJS. When this happens, `<unknown_token>` will likely be equal to `<provider>`.
3637
@@ -63,7 +64,7 @@ This likely happens when your project end up loading two Node modules of the pac
6364
Solutions:
6465
6566
- For **Yarn** Workspaces, use the [nohoist feature](https://classic.yarnpkg.com/blog/2018/02/15/nohoist) to prevent hoisting the package `@nestjs/core`.
66-
- For **pnpm** Workspaces, set `@nestjs/core` as a peerDependencies in your other module and `"dependenciesMeta": {{ '{' }}"other-module-name": {{ '{' }}"injected": true{{ '}}' }}` in the app package.json where the module is imported. see: [dependenciesmetainjected](https://pnpm.io/package_json#dependenciesmetainjected)
67+
- For **pnpm** Workspaces, set `@nestjs/core` as a peerDependencies in your other module and `"dependenciesMeta": {{ '{' }}"other-module-name": {{ '{' }}"injected": true &#125;&#125;` in the app package.json where the module is imported. see: [dependenciesmetainjected](https://pnpm.io/package_json#dependenciesmetainjected)
6768

6869
#### "Circular dependency" error
6970

0 commit comments

Comments
 (0)