Upgrade to Angular 17 – Error: node_modules/@types/node/globals.d.ts:72:13 – error TS2403: Subsequent variable declarations must have the same type

I followed the steps here https://update.angular.io/?v=16.0-17.0 to upgrade Angular from version 16 to 17 and updated all dependencies I know to march Angular 17 version.

I updated @angular-eslint/schematics from 16 to 17,
I updated @ngx-translate/core from 14 to 15,
I updated angular-oauth2-oidc from 14 to 17

Here are the dependencies of my package.json:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>"dependencies": {
"@angular/animations": "~17.3.6",
"@angular/common": "~17.3.6",
"@angular/compiler": "~17.3.6",
"@angular/core": "~17.3.6",
"@angular/forms": "~17.3.6",
"@angular/localize": "~17.3.6",
"@angular/platform-browser": "~17.3.6",
"@angular/platform-browser-dynamic": "~17.3.6",
"@angular/platform-server": "~17.3.6",
"@angular/router": "~17.3.6",
"@fortawesome/angular-fontawesome": "^0.11.1",
"@fortawesome/fontawesome-common-types": "^6.2.0",
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@progress/kendo-angular-buttons": "^8.0.0",
"@progress/kendo-angular-common": "^3.0.0",
"@progress/kendo-angular-dateinputs": "^7.0.1",
"@progress/kendo-angular-dialog": "^7.1.2",
"@progress/kendo-angular-dropdowns": "^7.0.2",
"@progress/kendo-angular-excel-export": "^5.0.1",
"@progress/kendo-angular-grid": "^7.2.1",
"@progress/kendo-angular-icons": "^2.0.1",
"@progress/kendo-angular-indicators": "^2.0.0",
"@progress/kendo-angular-inputs": "^9.0.3",
"@progress/kendo-angular-intl": "^4.1.0",
"@progress/kendo-angular-l10n": "^4.0.0",
"@progress/kendo-angular-label": "^4.0.0",
"@progress/kendo-angular-layout": "^7.1.0",
"@progress/kendo-angular-listview": "^4.0.4",
"@progress/kendo-angular-menu": "^4.0.0",
"@progress/kendo-angular-navigation": "^2.0.0",
"@progress/kendo-angular-notification": "^4.0.0",
"@progress/kendo-angular-pdf-export": "^4.0.0",
"@progress/kendo-angular-popup": "^5.0.0",
"@progress/kendo-angular-progressbar": "^3.1.1",
"@progress/kendo-angular-ripple": "^4.0.0",
"@progress/kendo-angular-tooltip": "^4.0.1",
"@progress/kendo-angular-treeview": "^7.1.0",
"@progress/kendo-data-query": "^1.6.0",
"@progress/kendo-drawing": "^1.16.3",
"@progress/kendo-licensing": "^1.2.2",
"@progress/kendo-svg-icons": "^0.1.2",
"@progress/kendo-theme-default": "^5.0.0",
"@types/lodash": "^4.14.186",
"angular-oauth2-oidc": "^17.0.2",
"bootstrap": "^5.1.3",
"cldr-core": "^42.0.0",
"cldr-dates-full": "^42.0.0",
"cldr-numbers-full": "^42.0.0",
"jquery": "^3.6.0",
"kendo-ui-license": "^1.0.1",
"locale-codes": "^1.3.1",
"oidc-client": "^1.11.5",
"popper.js": "^1.16.0",
"run-script-os": "^1.1.6",
"rxjs": "~7.5.5",
"zone.js": "~0.14.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "~17.3.6",
"@angular-eslint/builder": "17.3.0",
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/schematics": "17.3.0",
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "~17.3.6",
"@angular/compiler-cli": "~17.3.6",
"@types/jasmine": "~4.0.3",
"@types/jasminewd2": "~2.0.10",
"@types/jquery": "^3.5.14",
"@types/node": "^17.0.45",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"eslint": "^8.57.0",
"jasmine-core": "~4.1.0",
"karma": "~6.3.19",
"karma-chrome-launcher": "~3.1.1",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"ngx-translate-testing": "^6.1.0",
"tslib": "^2.4.0",
"typescript": "^5.4.5"
}
</code>
<code>"dependencies": { "@angular/animations": "~17.3.6", "@angular/common": "~17.3.6", "@angular/compiler": "~17.3.6", "@angular/core": "~17.3.6", "@angular/forms": "~17.3.6", "@angular/localize": "~17.3.6", "@angular/platform-browser": "~17.3.6", "@angular/platform-browser-dynamic": "~17.3.6", "@angular/platform-server": "~17.3.6", "@angular/router": "~17.3.6", "@fortawesome/angular-fontawesome": "^0.11.1", "@fortawesome/fontawesome-common-types": "^6.2.0", "@fortawesome/fontawesome-svg-core": "^6.2.0", "@ngx-translate/core": "^15.0.0", "@ngx-translate/http-loader": "^8.0.0", "@progress/kendo-angular-buttons": "^8.0.0", "@progress/kendo-angular-common": "^3.0.0", "@progress/kendo-angular-dateinputs": "^7.0.1", "@progress/kendo-angular-dialog": "^7.1.2", "@progress/kendo-angular-dropdowns": "^7.0.2", "@progress/kendo-angular-excel-export": "^5.0.1", "@progress/kendo-angular-grid": "^7.2.1", "@progress/kendo-angular-icons": "^2.0.1", "@progress/kendo-angular-indicators": "^2.0.0", "@progress/kendo-angular-inputs": "^9.0.3", "@progress/kendo-angular-intl": "^4.1.0", "@progress/kendo-angular-l10n": "^4.0.0", "@progress/kendo-angular-label": "^4.0.0", "@progress/kendo-angular-layout": "^7.1.0", "@progress/kendo-angular-listview": "^4.0.4", "@progress/kendo-angular-menu": "^4.0.0", "@progress/kendo-angular-navigation": "^2.0.0", "@progress/kendo-angular-notification": "^4.0.0", "@progress/kendo-angular-pdf-export": "^4.0.0", "@progress/kendo-angular-popup": "^5.0.0", "@progress/kendo-angular-progressbar": "^3.1.1", "@progress/kendo-angular-ripple": "^4.0.0", "@progress/kendo-angular-tooltip": "^4.0.1", "@progress/kendo-angular-treeview": "^7.1.0", "@progress/kendo-data-query": "^1.6.0", "@progress/kendo-drawing": "^1.16.3", "@progress/kendo-licensing": "^1.2.2", "@progress/kendo-svg-icons": "^0.1.2", "@progress/kendo-theme-default": "^5.0.0", "@types/lodash": "^4.14.186", "angular-oauth2-oidc": "^17.0.2", "bootstrap": "^5.1.3", "cldr-core": "^42.0.0", "cldr-dates-full": "^42.0.0", "cldr-numbers-full": "^42.0.0", "jquery": "^3.6.0", "kendo-ui-license": "^1.0.1", "locale-codes": "^1.3.1", "oidc-client": "^1.11.5", "popper.js": "^1.16.0", "run-script-os": "^1.1.6", "rxjs": "~7.5.5", "zone.js": "~0.14.5" }, "devDependencies": { "@angular-devkit/build-angular": "~17.3.6", "@angular-eslint/builder": "17.3.0", "@angular-eslint/eslint-plugin": "17.3.0", "@angular-eslint/eslint-plugin-template": "17.3.0", "@angular-eslint/schematics": "17.3.0", "@angular-eslint/template-parser": "17.3.0", "@angular/cli": "~17.3.6", "@angular/compiler-cli": "~17.3.6", "@types/jasmine": "~4.0.3", "@types/jasminewd2": "~2.0.10", "@types/jquery": "^3.5.14", "@types/node": "^17.0.45", "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", "eslint": "^8.57.0", "jasmine-core": "~4.1.0", "karma": "~6.3.19", "karma-chrome-launcher": "~3.1.1", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.0.0", "karma-jasmine-html-reporter": "^1.7.0", "ngx-translate-testing": "^6.1.0", "tslib": "^2.4.0", "typescript": "^5.4.5" } </code>
"dependencies": {
    "@angular/animations": "~17.3.6",
    "@angular/common": "~17.3.6",
    "@angular/compiler": "~17.3.6",
    "@angular/core": "~17.3.6",
    "@angular/forms": "~17.3.6",
    "@angular/localize": "~17.3.6",
    "@angular/platform-browser": "~17.3.6",
    "@angular/platform-browser-dynamic": "~17.3.6",
    "@angular/platform-server": "~17.3.6",
    "@angular/router": "~17.3.6",
    "@fortawesome/angular-fontawesome": "^0.11.1",
    "@fortawesome/fontawesome-common-types": "^6.2.0",
    "@fortawesome/fontawesome-svg-core": "^6.2.0",
    "@ngx-translate/core": "^15.0.0",
    "@ngx-translate/http-loader": "^8.0.0",
    "@progress/kendo-angular-buttons": "^8.0.0",
    "@progress/kendo-angular-common": "^3.0.0",
    "@progress/kendo-angular-dateinputs": "^7.0.1",
    "@progress/kendo-angular-dialog": "^7.1.2",
    "@progress/kendo-angular-dropdowns": "^7.0.2",
    "@progress/kendo-angular-excel-export": "^5.0.1",
    "@progress/kendo-angular-grid": "^7.2.1",
    "@progress/kendo-angular-icons": "^2.0.1",
    "@progress/kendo-angular-indicators": "^2.0.0",
    "@progress/kendo-angular-inputs": "^9.0.3",
    "@progress/kendo-angular-intl": "^4.1.0",
    "@progress/kendo-angular-l10n": "^4.0.0",
    "@progress/kendo-angular-label": "^4.0.0",
    "@progress/kendo-angular-layout": "^7.1.0",
    "@progress/kendo-angular-listview": "^4.0.4",
    "@progress/kendo-angular-menu": "^4.0.0",
    "@progress/kendo-angular-navigation": "^2.0.0",
    "@progress/kendo-angular-notification": "^4.0.0",
    "@progress/kendo-angular-pdf-export": "^4.0.0",
    "@progress/kendo-angular-popup": "^5.0.0",
    "@progress/kendo-angular-progressbar": "^3.1.1",
    "@progress/kendo-angular-ripple": "^4.0.0",
    "@progress/kendo-angular-tooltip": "^4.0.1",
    "@progress/kendo-angular-treeview": "^7.1.0",
    "@progress/kendo-data-query": "^1.6.0",
    "@progress/kendo-drawing": "^1.16.3",
    "@progress/kendo-licensing": "^1.2.2",
    "@progress/kendo-svg-icons": "^0.1.2",
    "@progress/kendo-theme-default": "^5.0.0",
    "@types/lodash": "^4.14.186",
    "angular-oauth2-oidc": "^17.0.2",
    "bootstrap": "^5.1.3",
    "cldr-core": "^42.0.0",
    "cldr-dates-full": "^42.0.0",
    "cldr-numbers-full": "^42.0.0",
    "jquery": "^3.6.0",
    "kendo-ui-license": "^1.0.1",
    "locale-codes": "^1.3.1",
    "oidc-client": "^1.11.5",
    "popper.js": "^1.16.0",
    "run-script-os": "^1.1.6",
    "rxjs": "~7.5.5",
    "zone.js": "~0.14.5"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~17.3.6",
    "@angular-eslint/builder": "17.3.0",
    "@angular-eslint/eslint-plugin": "17.3.0",
    "@angular-eslint/eslint-plugin-template": "17.3.0",
    "@angular-eslint/schematics": "17.3.0",
    "@angular-eslint/template-parser": "17.3.0",
    "@angular/cli": "~17.3.6",
    "@angular/compiler-cli": "~17.3.6",
    "@types/jasmine": "~4.0.3",
    "@types/jasminewd2": "~2.0.10",
    "@types/jquery": "^3.5.14",
    "@types/node": "^17.0.45",
    "@typescript-eslint/eslint-plugin": "^7.2.0",
    "@typescript-eslint/parser": "^7.2.0",
    "eslint": "^8.57.0",
    "jasmine-core": "~4.1.0",
    "karma": "~6.3.19",
    "karma-chrome-launcher": "~3.1.1",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.0.0",
    "karma-jasmine-html-reporter": "^1.7.0",
    "ngx-translate-testing": "^6.1.0",
    "tslib": "^2.4.0",
    "typescript": "^5.4.5"
  }

Here is my Angular CLI information

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Angular CLI: 17.3.6
Node: 18.20.2
Package Manager: npm 10.5.0
OS: win32 x64
Angular: 17.3.6
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1703.6
@angular-devkit/build-angular 17.3.6
@angular-devkit/core 17.3.6
@angular-devkit/schematics 17.3.6
@schematics/angular 17.3.6
rxjs 7.5.7
typescript 5.4.5
zone.js 0.14.5
</code>
<code>Angular CLI: 17.3.6 Node: 18.20.2 Package Manager: npm 10.5.0 OS: win32 x64 Angular: 17.3.6 ... animations, cli, common, compiler, compiler-cli, core, forms ... localize, platform-browser, platform-browser-dynamic ... platform-server, router Package Version --------------------------------------------------------- @angular-devkit/architect 0.1703.6 @angular-devkit/build-angular 17.3.6 @angular-devkit/core 17.3.6 @angular-devkit/schematics 17.3.6 @schematics/angular 17.3.6 rxjs 7.5.7 typescript 5.4.5 zone.js 0.14.5 </code>
Angular CLI: 17.3.6
Node: 18.20.2
Package Manager: npm 10.5.0
OS: win32 x64

Angular: 17.3.6
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.6
@angular-devkit/build-angular   17.3.6
@angular-devkit/core            17.3.6
@angular-devkit/schematics      17.3.6
@schematics/angular             17.3.6
rxjs                            7.5.7
typescript                      5.4.5
zone.js                         0.14.5

I installed a global typescript version 5.1.6 but the version of typescript in my project is 5.4.5 and I don’t know if that could be the reason of this error, I tried to update the global version from 5.1.6 to 5.4.5 but I got these errors

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:Program Filesnodejsnode_modules.corepack-yRBjKBW1
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:Program Filesnodejsnode_modules.corepack-yRBjKBW1'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:Program Filesnodejsnode_modules.corepack-yRBjKBW1'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\Program Files\nodejs\node_modules\.corepack-yRBjKBW1'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
</code>
<code>npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:Program Filesnodejsnode_modules.corepack-yRBjKBW1 npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'C:Program Filesnodejsnode_modules.corepack-yRBjKBW1' npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:Program Filesnodejsnode_modules.corepack-yRBjKBW1'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Program Files\nodejs\node_modules\.corepack-yRBjKBW1' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. </code>
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:Program Filesnodejsnode_modules.corepack-yRBjKBW1
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:Program Filesnodejsnode_modules.corepack-yRBjKBW1'
npm ERR!  [Error: EPERM: operation not permitted, mkdir 'C:Program Filesnodejsnode_modules.corepack-yRBjKBW1'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'C:\Program Files\nodejs\node_modules\.corepack-yRBjKBW1'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

How can I get rid of the error please?
enter image description here

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật