[英]Angular: Swiper carousel is not working - Error: node_modules/swiper/angular/angular/src/swiper-events.d.ts
[英]ERROR in node_modules/@angular/material/table/cell.d.ts -Typescript version problem angular
我在我的項目中使用 angular,所以我遇到了這個問題,我試圖將我的 typscript 降級到 3.9.7,但仍然無法在這里工作是我的package.json<\/strong>依賴項。
"private": true,
"dependencies": {
"@angular-devkit/core": "^10.1.3",
"@angular-devkit/schematics": "^10.1.3",
"@angular-material-components/datetime-picker": "^4.0.2",
"@angular/animations": "^10.1.3",
"@angular/cdk": "^10.0.0",
"@angular/common": "^10.1.3",
"@angular/compiler": "~10.1.3",
"@angular/core": "^10.1.3",
"@angular/forms": "^10.1.3",
"@angular/google-maps": "^10.0.1",
"@angular/material": "^10.0.0",
"@angular/platform-browser": "^10.1.3",
"@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "^10.1.3",
"@angular/typescript": "^2.0.0-5d0e199",
"@auth0/angular-jwt": "^4.0.0",
對我來說,使用最新版本重新安裝有幫助:
npm remove @angular/material @angular/cdk
npm i @angular/material@latest @angular/cdk@latest
如果您有紗線,請用紗線替換 npm。
將此添加到 tsconfig.json:
{
"compilerOptions": {
"skipLibCheck": true
}
}
有關更多信息,請點擊鏈接: https : //github.com/akveo/nebular/issues/2501#issuecomment-960650663
如果您有 npm 版本 8,請嘗試降級到舊版本。 它為我解決了這個問題。
我刪除了 material 文件夾並安裝了 npm install @angular/material@^10.1.3 並將 @angular/core 降級到 10.1.3 我使用最新版本的 angular 創建了新項目,然后復制了 cell.d.ts 文件並粘貼它在我的項目中,現在正在工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.