2

I have just created a new Angular CLI project and have added the Angular Material library.

My versions are as follows:

  • node => 11.3.0
  • npm => 6.7.0
  • ng => 6.1.10
  • googleapis => 36.0.0

I am trying to run ng build and continue to receive the above error message. Has anyone else run into this issue, and if so, how were you able to solve it?

It seems like there were some fixes by upgrading to the latest TS and/or removing and reinstalling your node_modules, but I have done each with no luck.

User 5842
  • 2,849
  • 7
  • 33
  • 51
  • Did you try this? [Initializers are not allowed in ambient contexts error when installing Blueprint](https://stackoverflow.com/questions/42301181/initializers-are-not-allowed-in-ambient-contexts-error-when-installing-blueprint) – Prashanth S. Jan 27 '19 at 04:37
  • Yes, and no luck. I have `typescript -v => 2.9.2` – User 5842 Jan 27 '19 at 05:44
  • Greetings! With the Google libraries, you probably want to upgrade to the latest version of TypeScript. We made a lot of changes that may not be backwards compatible with TypeScript 2.x. It's probably a good idea to also update to v37 of the googleapis module ;) – Justin Beckwith Feb 01 '19 at 06:08

0 Answers0