-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Crash in getJSDocTags on const a = b = () => 0;
#24963
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
Comments
@sandersn can you take a look. |
The assert is the one that detects duplicated jsdoc tags. |
Is there any plan to release a 2.9.3 with this fix? |
Pretty please? |
TypeScript 3.0 is out, which contains a fix for this issue and doesn't have any major breaking changes associated with it. I'd recommend upgrading to that version as we don't plan to backport a new 2.9 release at this time. |
Thanks Ryan, we're stuck using 2.9.2 due to Angular 6 though. Thanks anyway. |
I'm also with angular 6, can we solve it in some way? |
@rodrigoEclipsa Try looking for double assignments |
Just in the progress of upgrading from Angular 5 to 6 and stumbled upon this issue, too. As there aren't any plans for Angular 6 to be upgraded to TypeScript 3 and there aren't any plans to backport this fix to the TypeScript 2.9 branch it seems that there isn't any chance to upgrade to Angular 6 :( More detailed: Having a dependency on |
Does anyone have a fix for angular@6 yet? I don't have any double assignments, it's referencing |
I am facing this issue too, waiting for resolutions |
It's probably easiest to fix crypto-js since that's the library everybody on this thread depends on. |
Actually, I wonder why crypto-js is being checked. If it has a d.ts file, then it should never check the JS file at all. For future investigation:
|
I agree, it’s weird. It also fails with @types/crypto-js installed, but have not tried allowJs yet, will check in a minute |
@sandersn allowJS true/false makes no difference. I've tried a number of combinations. My specific problem, and I'd garner a bet that this would be most peoples, it appears that it's the AWS Cognito suite that is using this library. |
I got the same error when trying to use I am trying the latest angular version v7.x bit this issue still not be fixed |
@stormit-vn Does angular 7 still use typescript 2.9? @mrowles @stormit-vn I modified crypto-js. Can you try installing from my branch to see if it works? I think this is the command: |
@sandersn Angular 7 is targeting TypeScript 3.1.3, but is not released yet (currently in release candidate stage). Haven't checked if it fixes the issue, but am probably going to, because I also suffer from this issue with my Angular 6 + AWS Amplify app (crypto-js dep.). Someone over at #25067 (comment) seems to still have the issue with TypeScript 3.1, so I am not too hopeful. |
@sandersn Thanks for your efforts mate, very much appreciated. Unfortunately this didn't seem to work in my project, with various configs. Perhaps I need to fork and update Normal build/non-AOT (previously working, now broken, new errors):
AOT Build (previously broken, still broken, but new errors):
I found the webpack.config
I believe angular@7 removes the <2.10 dependency. |
@mrowles Can you try something like
I suspect that the version installed from github doesn't have files in the right places. It's also possible that 3.1.9-1 didn't get installed in the top-level node_modules, but underneath amazon-cognito-identity, and that the github-installed version isn't being resolved at all. |
FWIW, I did a very brief test with a straight-forward upgrade to Angular 7.0.0-rc.1, Angular CLI 7.0.0-rc.3 and TypeScript 3.1.x with an AWS-Amplify/crypto-js project that failed before and it actually works now. |
Wonder what is different? I upgraded to the following and still no luck, exactly the same errors (even after a clean npm install):
I also tried to use @sandersn PR sha to no avail :( |
I have updated the following packages and my errors have changed, so possibly resolving the previous problems in case it works for the others:
My errors are now potentially related to something else:
I've installed |
Well, it’s still a crash in tsc, but in a different place. Can you run |
@sandersn It is using 8.9.4, so I downgraded my version to the same (from 9.x) but still no luck. |
With the actual release of angular@7 today, along with @ngtools/[email protected] + @angular-devkit/[email protected] - this is now working! Big thanks to @sandersn for the help dude! |
Thank you all for your help. We now able to build the bundler. Cheers! |
Is there a fix for this issue if you are still using Angular v6? |
For Angular v6 try version 3.1.2-2 |
following @Andy-MS comment, I manually broken down all double assignment a= b = c into a= b; b= c in these two files of ./node_modules/crypto-js/core.js and ./node_modules/crypto-js/cipher-core.js; then error gone!! my angular version: |
TypeScript Version: 3.0.0-dev.20180609
Code
a.js
Expected behavior:
No crash.
Actual behavior:
CC @sandersn
The text was updated successfully, but these errors were encountered: