gpt4 book ai didi

angular - 模块 node_modules/angular-2-local-storage/dist/index.d.ts 的元数据版本不匹配错误,找到版本 4,预期为 3

转载 作者:太空狗 更新时间:2023-10-29 18:18:41 24 4
gpt4 key购买 nike

我正在使用 Angular2 应用程序并使用 npm start 命令遇到以下错误。这是完整的代码模块/home/x/Desktop/koohbaad-web/node_modules/angular-2-local-storage/dist/index.d.ts 的元数据版本不匹配错误,找到版本 4,预期为 3,在/home/中解析符号 AppModule x/Desktop/koohbaad-web/src/app/app.module.ts,解析符号AppModule in/home/x/Desktop/koohbaad-web/src/app/app.module.ts,解析符号AppModule in/home/x/Desktop/koohbaad-web/src/app/app.module.ts

这是我的 package.json 文件

{
"name": "koohbad-tour",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --host 192.168.1.193",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@agm/core": "^1.0.0-beta.0",
"@angular/animations": "^4.*",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@types/underscore": "^1.8.0",
"angular-2-local-storage": "*",
"angular-star-rating": "^3.0.8",
"angular2-masonry": "^0.4.0",
"angular2-recaptcha": "*",
"angular2-text-mask": "^8.0.1",
"core-js": "^2.4.1",
"enhanced-resolve": "^3.3.0",
"jquery": "^3.2.1",
"ng-lazyload-image": "^3.3.3",
"ng-select": "^1.0.0-beta.5",
"ng2-select2": "^1.0.0-beta.10",
"ngx-infinite-scroll": "^0.5.1",
"node-sass": "^4.7.2",
"rxjs": "^5.1.0",
"screenfull": "^3.3.1",
"underscore": "*",
"web-animations-js": "^2.2.5",
"zone.js": "^0.8.4",
"ngx-swiper-wrapper": "4.0.0"
},
"devDependencies": {
"@angular/cli": "1.0.0",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/jquery": "^2.0.42",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"ngx-dropzone-wrapper": "^4.0.3",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}

我得到的错误是

ERROR in Metadata version mismatch for module node_modules/angular-2-local-storage/dist/index.d.ts, found version 4, expected 3 enter image description here

请帮帮我。

最佳答案

这是因为 angular-2-local-storage 是使用 Angular 5 构建的,它生成了版本 4 的元数据文件(你的编译器无法理解,因为你的 angular 4 项目只能读取版本 3 及以下的元数据文件)我建议您将项目更新到 Angular 5 并重试

关于angular - 模块 node_modules/angular-2-local-storage/dist/index.d.ts 的元数据版本不匹配错误,找到版本 4,预期为 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50550908/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com