ng update @angular/cli caused error "unexpected token function"

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [ `x`] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ x] devkit
- [ ] schematics

Versions

node --version = v6.11.3 npm --version = 3.10.10

Angular CLI: 6.0.8 Node: 6.11.3 OS: win32 x64 Angular: 4.4.7 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router, tsc-wrapped

Package Version

@angular-devkit/architect 0.6.8 @angular-devkit/core 0.6.8 @angular-devkit/schematics 0.6.8 @angular/cli 6.0.8 @schematics/angular 0.6.8 @schematics/update 0.6.8 rxjs 5.5.11 typescript 2.3.4

Repro steps

I was trying to generate the service in my project created today with name JWTLogin.

ng g s security/security

it gives me error "cannot read property ‘nulllogger’ of undefined " to solve this i updated the project with latest cli.

npm install --save @angular/cli@latest

after this when i entered below command

ng update @angular/cli

causes the below error in console window error

The log given by the failure

Desired functionality

Mention any other details that might be useful

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
kumarocommented, Jun 27, 2018

upgrading to node8 fixed it for me. Details about actual error would definitely be helpful.

Luckily i found update guide (https://update.angular.io/) which says we have to update to Node8 or later before running ng update

0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - ng new my-app unexpected token = - Stack Overflow
As of 2017-06-03, using Angular-CLI 1.1.0, NodeJS 7.10.0, npm 5.0.2, ... issue that was causing the error to appear in VS 2017's Task...
Read more >
angular/angular-cli - Gitter
main.bundle.js:250Uncaught SyntaxError: Unexpected identifier. refreshing a couple of times fixes them. (sometimes) Each refresh gives another error.
Read more >
Angular cli installation woes : r/Angular2 - Reddit
Hi, I uninstalled angular cli to update to a newer version and when I ... it I get this error: Unknown error: SyntaxError:...
Read more >
Npm install angular cli Unexpected token
Ng build syntaxerror unexpected token function. Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your...
Read more >
How to Check Which Versions of Node Angular CLI Supports
Anytime I ran ng serve I would get this error: Unknown error: SyntaxError: Unexpected token 'export'. After a lot of trial and error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found