Useful or not, from you.
angular-cli SyntaxError: Unexpected token 'export'

<!--๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…

Oh hi there! ๐Ÿ˜„

To expedite issue processing please search open and closed issues before submitting a new one. Existing issues often contain information about workarounds, resolution, or progress updates.

๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…๐Ÿ”…-->

๐Ÿž Bug report

Command (mark with an x)

<!-- Can you pin-point the command or commands that are effected by this bug? --> <!-- โœ๏ธedit: -->

  • [x] new
  • [ ] build
  • [ ] serve
  • [ ] test
  • [ ] e2e
  • [x] generate
  • [ ] add
  • [ ] update
  • [ ] lint
  • [ ] extract-i18n
  • [ ] run
  • [ ] config
  • [ ] help
  • [x] version
  • [ ] doc

Is this a regression?

Yes.

Description

Update Angular CLI from version 9.1.7 to 11. When executed following command had following error message ng --version Unknown error: SyntaxError: Unexpected token 'export' I am using Windows 10

๐Ÿ”ฌ Minimal Reproduction

c:\Users\xxx\Desktop>npm uninstall -g @angular/cli removed 284 packages in 3.995s

c:\Users\xxx\Desktop>npm cache verify Cache verified and compressed (~\AppData\Roaming\npm-cache_cacache): Content verified: 2647 (118926161 bytes) Index entries: 4128 Finished in 5.221s c:\Users\xxx\Desktop>npm install -g @angular/cli@latest npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported C:\Users\xxx\AppData\Roaming\npm\ng -> C:\Users\xxx\AppData\Roaming\npm\node_modules@angular\cli\bin\ng

@angular/cli@11.0.2 postinstall C:\Users\xxx\AppData\Roaming\npm\node_modules@angular\cli node ./bin/postinstall/script.js

  • @angular/cli@11.0.2 added 253 packages from 201 contributors in 19.587s

c:\Users\xxx\Desktop>ng Unknown error: SyntaxError: Unexpected token 'export'

๐Ÿ”ฅ Exception or Error

<pre><code> Unknown error: SyntaxError: Unexpected token 'export' </code></pre>

๐ŸŒ Your Environment

Windows 10 c:\Users\xxx\Desktop>npm --v 6.14.9

c:\Users\xxx\Desktop>node -v v13.6.0

That's a useful answer
Without any help

Thanks, after update of NodeJs, it worked.