update your angular cli globally and locally code example
Example 1: update angular cli globally
npm update @angular/cli -g
Example 2: npm install --save-dev @angular/cli@latest
npm install --save-dev @angular/[email protected]
npm update @angular/cli -g
npm install --save-dev @angular/[email protected]