Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failure for Angular 8 projects using v12.1 #1168

Closed
Wisdomb33r opened this issue Feb 12, 2020 · 7 comments · Fixed by lingounet/testage#10
Closed

Compilation failure for Angular 8 projects using v12.1 #1168

Wisdomb33r opened this issue Feb 12, 2020 · 7 comments · Fixed by lingounet/testage#10

Comments

@Wisdomb33r
Copy link

Current behavior

Compilation error for Angular 8 projects using v12.1 of ngx-translate :

ERROR in ../node_modules/@ngx-translate/core/lib/translate.directive.d.ts:14:9 - error TS1086: An accessor cannot be declared in an ambient context.

14     set translate(key: string);

Only the first error was copy/pasted, there is a dozen of similar.

Expected behavior

TypeScript compilation should not fail as v12.1 branch is advertised for Angular 8 in the documentation.

How do you think that we should fix this?

v12.1 Angular peer dependency is set to >= 8.0.0, but TypeScript version used to compile this version of the library is 3.7.x. This is a mismatch with Angular supported TypeScript version, which are 3.4 for Angular 8.0/8.1 branches, 3.5 for Angular 8.2 branches, and 3.6/3.7 for Angular 9.

The peer dependency of v12.1 should reflect this if possible. The compatibility table of the documentation should at least be updated accordingly (currently, it still states all 12.x branches is compatible with Angular 8).

Minimal reproduction of the problem with instructions

Any Angular project with TypeScript 3.5 (which roughly means 8.2 version of Angular) cannot compile v12.1 published version.

@ocombe ocombe closed this as completed in 4f48e81 Feb 12, 2020
@ocombe
Copy link
Member

ocombe commented Feb 12, 2020

Hey, thanks for the report ! It looks like there's a breaking change with TS 3.7.x that throws this error if your project uses a 3.6.x version of typescript.
I just published a fix, let me know if that works for you

@Wisdomb33r
Copy link
Author

@ocombe As of now (almost half an hour after your fix), the 12.1.1 version is still not available on npmjs.org :

Version History
12.1.0 | 2 hours ago
12.0.0 | 7 days ago

Might be your CI publishing process is currently running and taking a while. I'm leaving the office in a few minutes and wont be able to test your version until tomorrow. Can you have a look to be sure the version is correctly published to npmjs.org ?

@ocombe
Copy link
Member

ocombe commented Feb 12, 2020

Yes, I've received the confirmation email from npm, and https://www.npmjs.com/package/@ngx-translate/core lists the latest version as 12.1.1

@Wisdomb33r
Copy link
Author

@ocombe Clicking your link just now still show me the 12.1.0 version as latest...

@ngx-translate/core
12.1.0 • Public • Published 2 hours ago

Don't you have a special view because you are authenticated on npmjs repository ? I cannot see the 12.1.1 for now...

@ocombe
Copy link
Member

ocombe commented Feb 12, 2020

I don't think so...

image

image

@Wisdomb33r
Copy link
Author

@ocombe Today I can see the 12.1.1 version. Tested and working, thanks for the quick fix.

@ocombe
Copy link
Member

ocombe commented Feb 13, 2020

Awesome! Thanks for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants