0

When I try to create a new project with Angular CLI, with:

ng n app

I get this error:

C:\Users\Venkateshwarn 
M\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng:26
                  );
                  ^
SyntaxError: Unexpected token )
     at createScript (vm.js:56:10)
     at Object.runInThisContext (vm.js:97:10)
     at Module._compile (module.js:542:28)
     at Object.Module._extensions..js (module.js:579:10)
     at Module.load (module.js:487:32)
     at tryModuleLoad (module.js:446:12)
     at Function.Module._load (module.js:438:3)
     at Module.runMain (module.js:604:10)
     at run (bootstrap_node.js:390:7)
     at startup (bootstrap_node.js:150:9)

How can I upgrade or uninstall Angular CLI?

1

2 Answers 2

0

To uninstall angular cli you can use this command:

npm uninstall -g @angular/cli
npm cache clean

you can refer this article to get more knowledge: https://www.npmjs.com/package/@angular/cli

To upgrade angular

Perform a basic update to the current stable release:

ng update @angular/cli @angular/core

To update from one major version to another:

ng update @angular/cli@^<major_version> @angular/core@^<major_version>

you can refer this article to get more: https://angular.io/cli/update

Sign up to request clarification or add additional context in comments.

Comments

-1

It should be solved by reinstalling Nodejs and Angular ClI, first of all uninstall both, and at the end of the reinstallation update Angular CLI.

2 Comments

Can you write it in english please ?
No problem :) Remember this ;)

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.