angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Errors after upgrade

Open RobertVogt opened this issue 7 years ago • 7 comments

I am receiving the errors

4538:120-128 "export 'ɵɵinject' was not found in '@angular/core'

4538:34-52 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

after upgrading to version 1.1.0 from 1.0.0-beta.5

RobertVogt avatar Nov 21 '19 19:11 RobertVogt

1.1.0 is compatible only with angular 8.0+

ghost avatar Nov 21 '19 19:11 ghost

So I think the issue is this is a breaking change for Angular 7 projects. For example, in our package.json, we have the following:

"@agm/core": "^1.0.0-beta.5"

On a fresh npm install, this silently updated, I believe to 1.1.0 and breaks. According to npm, 1.1.0 is a minor, backwards compatible change. However, in this case it is not actually backwards compatible.

jmac-slash0 avatar Nov 21 '19 21:11 jmac-slash0

Correct, we didn't expect this regression.

ghost avatar Nov 21 '19 21:11 ghost

So for anyone using 1.0.0-beta.5/6/7 with Angular 7 and suddenly started seeing "ɵɵdefineInjectable" on deployment esp on production, a workaround for now would be to remove the '^' sign from the @agm/core package in package.json to install the exact version instead of the latest one (which is not backwards compatible).

thisiszoaib avatar Nov 22 '19 07:11 thisiszoaib

use 1.0.0 without ^ sign

ghost avatar Nov 22 '19 09:11 ghost

.... what about people not knowing about this? Shouldn't a warning be added in documentation or during package installation?

massic80 avatar Nov 25 '19 15:11 massic80

use 1.0.0 without ^ sign

I'd rather set ~1.0.0

massic80 avatar Dec 04 '19 11:12 massic80