简体   繁体   中英

Failing to start node application with error

I am seeing an error when I start to run my node application.

Error says "ERROR in Metadata version mismatch for module ../node_modules/@ng-bootstrap/ng-bootstrap/index.d.ts, found version 4, expected 3"

Full error trace is:

ERROR in Metadata version mismatch for module D:/MyProj/Client/node_modules/@ng-bootstrap/ng-bootstrap/index.d.ts, found version 4, expected 3, resolving symbol AppModule in D:/MyProj/Client/src/app/app.module.ts, resolving symbol AppModule in D:/MyProj/Client/src/app/app.module.ts, resolving symbol AppModule in D:/MyProj/Client/src/app/app.module.ts webpack: Failed to compile.

I got the same error

Probably in your package.json you have the following:

"@ng-bootstrap/ng-bootstrap": "^<VERSION_HERE>"

The problem is with the dependecies versions, so you can just update everthing to the last version, there is a topic in stackoverflow already: Metadata version mismatch with Angular 4

Or in my case that I couldn't just update all packages,I did the following:

I removed the package, also removed the ^ signal before the version number and then ran npm i again.

After this the app worked properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM