You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash in getJSDocTags on const a = b = () => 0; #24963
Error: Debug Failure. False expression.
at getJSDocTags (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:10444:22)
at getFirstJSDocTag (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:10451:24)
at Object.getJSDocType (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:10428:19)
at getContextualSignature (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:34131:32)
at checkFunctionExpressionOrObjectLiteralMethod (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:36920:43)
at checkExpressionWorker (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:37846:28)
at checkExpression (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:37779:42)
at checkBinaryLikeExpression (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:37393:29)
at checkBinaryExpression (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:37385:20)
at checkExpressionWorker (/home/andy/.nvm/versions/node/v10.1.0/lib/node_modules/typescript/lib/tsc.js:37867:28)
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.
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 autobahn.js which depends on crypto-js which causes this issue.
Does anyone have a fix for angular@6 yet? I don't have any double assignments, it's referencingcrypto-js@^3.1.9-1 for me (a dependency of amazon-cognito-identity-js).
$ cd node_modules/crypto-js
$ npm install
$ npm run build # I needed to install grunt first
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.
Reacted by Nathan Shively-Sanders, Matthew Rowles and Ada Ho
My errors are now potentially related to something else:
ERROR in ./node_modules/amazon-cognito-identity-js/es/CognitoUser.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'flags' of undefined
at isRelatedTo (/Users/username/workspace/project/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:40600:28)
I've installed amazon-cognito-identity-js@3.0.3 which still didn't fix this issue, but this might be a config issue with webpack or some such, i'll keep digging.
following Andy (Andrewkraft) (@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!!
Activity
mhegazy commentedon Jun 14, 2018
Nathan Shively-Sanders (@sandersn) can you take a look.
sandersn commentedon Jun 14, 2018
The assert is the one that detects duplicated jsdoc tags.
() => 0is gettingdocadded twice.MLoughry commentedon Jun 26, 2018
Is there any plan to release a 2.9.3 with this fix?
larssn commentedon Aug 8, 2018
Pretty please?
RyanCavanaugh commentedon Aug 8, 2018
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.
larssn commentedon Aug 9, 2018
Thanks Ryan, we're stuck using 2.9.2 due to Angular 6 though. Thanks anyway.
rodrigoEclipsa commentedon Aug 10, 2018
I'm also with angular 6, can we solve it in some way?
ClemensSchneider commentedon Sep 14, 2018
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
autobahn.jswhich depends oncrypto-jswhich causes this issue.mrowles commentedon Oct 15, 2018
Does anyone have a fix for angular@6 yet? I don't have any double assignments, it's referencing
crypto-js@^3.1.9-1for me (a dependency ofamazon-cognito-identity-js).9 remaining items
sandersn commentedon Oct 17, 2018
Matthew Rowles (@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.
d2kx commentedon Oct 17, 2018
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.
mrowles commentedon Oct 18, 2018
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 Nathan Shively-Sanders (@sandersn) PR sha to no avail :(
mrowles commentedon Oct 18, 2018
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
amazon-cognito-identity-js@3.0.3which still didn't fix this issue, but this might be a config issue with webpack or some such, i'll keep digging.sandersn commentedon Oct 18, 2018
Well, it’s still a crash in tsc, but in a different place. Can you run
node <tsc-path-inside-angular-devkit> —versionand see if or something newer?mrowles commentedon Oct 18, 2018
Nathan Shively-Sanders (@sandersn) It is using 8.9.4, so I downgraded my version to the same (from 9.x) but still no luck.
mrowles commentedon Oct 19, 2018
With the actual release of angular@7 today, along with @ngtools/webpack@7.0.1 + @angular-devkit/build-optimizer@0.10.1 - this is now working!
Big thanks to Nathan Shively-Sanders (@sandersn) for the help dude!
stormit-vn commentedon Oct 19, 2018
Thank you all for your help. We now able to build the bundler.
Cheers!
MikeAlexMartinez commentedon Apr 30, 2019
Is there a fix for this issue if you are still using Angular v6?
fix: typescript transpilation / assertion error in 2.9.x
fix: typescript transpilation / assertion error in 2.9.x
fix: typescript transpilation / assertion error in 2.9.x
JamDoughnnut commentedon Nov 11, 2020
For Angular v6 try version 3.1.2-2
chenghongm commentedon Nov 17, 2021
following Andy (Andrewkraft) (@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: