question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AST error on a file

See original GitHub issue

I’m working on a project and when I’m trying to generate the flowchart for all files, everything but one goes well. I haven’t properly dug into the code as I’m really busy at the moment but thought it would be better to have this issue known.

Error at buildFlowTreeFromAstt.isTSTypeAssertion is not a function
                                                                                       /mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:39700
                                                                                            throw e;
                                                                                                                                                                ^
                                                                                                                                                                                                                                                                                                                               TypeError: t.isTSTypeAssertion is not a function
                                                                                                                            at ConditionalExpression (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:3916:82)
                                                    at ArrowFunctionExpression (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:3910:43)
                                                  at find (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:3695:15)
                                                                     at Object.needsParens (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:3748:10)
                                                       at Generator.print (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:4497:25)
                                                          at Generator.printJoin (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:4576:12)
                                                      at Generator.printList (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:4648:17)
                                                      at Generator.CallExpression (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:1019:8)
                                                  at /mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:4509:23
                                                                            at Buffer.withSource (/mnt/c/Users/max/Projects/hashmyjs/node_modules/js2flowchart/dist/js2flowchart.js:614:28)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
chucklucommented, Jun 30, 2019
0reactions
chucklucommented, Jun 29, 2019

Encounter the same error when try to analyze https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.fileupload.js

PS C:\repository\GitHub\Other\jQuery-File-Upload\js> js2flowchart.cmd .\jquery.fileupload.js
Error at buildFlowTreeFromAstt.isTSTypeAssertion is not a function
C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:39700
                throw e;
                ^

TypeError: t.isTSTypeAssertion is not a function
    at ConditionalExpression (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:3916:82)
    at AssignmentExpression (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:3927:34)
    at find (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:3695:15)
    at Object.needsParens (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:3748:10)
    at Generator.print (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:4497:25)
    at Generator.AssignmentExpression (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:1085:8)
    at C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:4509:23
    at Buffer.withSource (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:614:28)
    at Generator.withSource (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:4380:15)
    at Generator.print (C:\Users\clu\AppData\Local\Yarn\Data\global\node_modules\js2flowchart\dist\js2flowchart.js:4508:10)
Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR: Malformed or corrupted AST file - Apple Developer
10 days later, tried building again and I get an error I have never seen before. It says: Malformed or corrupted AST file:...
Read more >
Malformed or corrupted AST file - Stack Overflow
I've tried to copy QuartzCore.framework in that Directory. It give me then a punch of new errors. Then if I remove the framework...
Read more >
ast file error messages / Frequently asked questions / Home
Another commonly experienced error when uploading an . ast file: Please see below image for an example of what the cause of the...
Read more >
How to open .AST file? .AST extension Information.
Execute .AST file by double-clicking on it. If you have already installed the software to open it and the files associations are set...
Read more >
Existing variable using format string causes AST error #1659
AST error message: invalid syntax (<unknown>, line 3) Oh no! 1 file would fail to reformat. (black-rHKUX7ap) R:\Programming\black>type ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found