I solved myself for this problem using the below link
[
Solution]
then use the following command for the local package folder
"npm install --save-dev @angular/cli@latest"
Now ng command is working! but when I use the create component command 'ng g c newcomponent'
it says the error 'Unable to find any apps in `.angular-cli.json'
Please help me on this