I'm having this error;
ERROR in Metadata version mismatch for module C: / King of nuggets / API / restaurantui / node_modules / primeng / components / inputtext / inputtext.d.ts, found version 4, expected 3, resolving symbol AdminModule in
C: / King of the little houses / API / restaurantui / src / app / admin / admin.module.ts, resolving symbol AdminModule in C: / King of nuggets / API / restaurantui / src / app / admin / admin.module.ts
I'll explain when it happens.
I turn on the computer and run all the services to run the system as MongoDb and Node Express, then I run Angular with the command ng server
after it compiles it generates the error then;
TheerrorinformsthattheproblemisintheAdminModulefile,whichisverystrangeisthatthereisnoerrorinthisfile.ButformyapplicationtouploadIhavetosimplychangeanythinginthefile,saveitanditworksagainandtheerrordisappears.
ButwhatkindofchangedoImakeinthefile?It'skindofgivingafilespacewithoutchanginganycodesnippets.
Ifindthiskindoferrorverystrange,IneedtocorrectevenifIcanevolvethisprojectbecauseI'llsendittotheserverinthecloud,andIcannotkeepitlikethis;
ThisistheAdminModulefile;
import{NgModule}from'@angular/core';import{CommonModule}from'@angular/common';import{FormsModule}from'@angular/forms';import{BrowserAnimationsModule}from'@angular/platform-browser/animations';import{MainComponent}from'./restaurant/main/main.component';import{ListComponent}from'./restaurant/list/list.component';import{AddComponent}from'./restaurant/add/add.component';import{EditComponent}from'./restaurant/edit/edit.component';import{AdminRoutingModule}from'./routes/admin-routing.module';import{SharedModule}from'../shared/shared.module';import{AddmenuComponent}from'./menu/addmenu/addmenu.component';import{ListmenuComponent}from'./menu/listmenu/listmenu.component';import{EditmenuComponent}from'./menu/editmenu/editmenu.component';import{InputTextModule}from'primeng/components/inputtext/inputtext';import{ButtonModule}from'primeng/components/button/button';import{DataTableModule}from'primeng/components/datatable/datatable';import{TooltipModule}from'primeng/components/tooltip/tooltip';@NgModule({imports:[CommonModule,BrowserAnimationsModule,FormsModule,AdminRoutingModule,SharedModule,//modulosdeterceirosInputTextModule,ButtonModule,DataTableModule,TooltipModule],declarations:[MainComponent,ListComponent,AddComponent,EditComponent,AddmenuComponent,ListmenuComponent,EditmenuComponent],exports:[MainComponent,ListComponent,AddComponent,EditComponent,AddmenuComponent,ListmenuComponent,EditmenuComponent],})exportclassAdminModule{}
Needingtoaskquestions,I'llbeavailable.
Thisismypackage.jsonfile
{"name": "meat",
"version": "1.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/animations": "4.0.2",
"@angular/common": "4.0.2",
"@angular/compiler": "4.0.2",
"@angular/compiler-cli": "4.0.2",
"@angular/core": "4.0.2",
"@angular/forms": "4.0.2",
"@angular/http": "4.0.2",
"@angular/platform-browser": "4.0.2",
"@angular/platform-browser-dynamic": "4.0.2",
"@angular/router": "4.0.2",
"admin-lte": "2.3.11",
"core-js": "2.4.1",
"font-awesome": "4.7.0",
"intl": "1.2.5",
"jquery": "3.1.1",
"primeicons": "^1.0.0-beta.10",
"primeng": "^6.1.2",
"reflect-metadata": "0.1.9",
"rxjs": "5.4.3",
"ts-helpers": "1.1.2",
"web-animations-js": "^2.3.1",
"zone.js": "0.8.4"
},
"devDependencies": {
"@angular/cli": "1.2.7",
"@angular/compiler-cli": "4.0.2",
"@types/jasmine": "2.5.38",
"@types/node": "7.0.5",
"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-jasmine": "1.1.0",
"karma-remap-istanbul": "0.2.2",
"protractor": "5.1.0",
"ts-node": "2.1.0",
"tslint": "4.5.0",
"typescript": "2.5.2",
"webdriver-manager": "10.2.5"
}
}
I tried to change the @ angular / cli is in the version "1.2.7" to 4.0.2, then I tried and ran the npm install and generated this problem;
Luckily I have an earlier version of the project without the modification.