1

I am trying to update Angular. So I ran ng update --all from CMD in my Angular project that I created with vs-2015 and in return I got another error in my project:

Error TS2345 Argument of type '{ imports: typeof BrowserModule[]; declarations: typeof AppComponent[]; bootstrap: typeof AppComp...' is not assignable to parameter of type 'NgModule'.

Property 'true' is missing in type '{ imports: typeof BrowserModule[]; declarations: typeof AppComponent[]; bootstrap: typeof AppComp...'.

TypeScript Virtual Projects c:\users\lesibamo\documents\visual studio 2015\Projects\Angular4demo\Angular4demo\src\app\app.module.ts 6 Active

1 Answer 1

1
  1. Delete your package-lock.json file
  2. Delete Node node_modules folder in your angular project
  3. open your command promt and navigate your Angular project folder, type npm update
  4. Confirm the Angular version by ng --version
  5. Run your project ng serve if update success the project should load without error
Sign up to request clarification or add additional context in comments.

1 Comment

this fixed migration to angular 9 where angular-devkit was only referenced in package-lock.json

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.