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

Crash encountered #41

Open
bradzacher opened this issue Oct 29, 2024 · 0 comments
Open

Crash encountered #41

bradzacher opened this issue Oct 29, 2024 · 0 comments

Comments

@bradzacher
Copy link

I tried running ts-fix over our massive codebase at Canva in an attempt to auto-fix the isolatedDeclaration errors as a test. It took quite a while -- well over 12 hours and I left it running over night.

In the morning I checked my laptop and found it had crashed:

node /Users/bjz/git/ts-fix/dist/cli.js --write -e 9010 -e 9016 -e 9015 -e 9008 -e 9007 --ignoreGitStatus --tsconfig tsconfig.build.json
The project is being created...

Using TypeScript 5.5.4

Found 15365 diagnostics with code 9010

Found 4911 diagnostics with code 9016

Found 437 diagnostics with code 9015

Found 34138 diagnostics with code 9008

Found 23554 diagnostics with code 9007
/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:177120
          Debug.assert(tokenInfo.token.end === child.end, "Token end is child end");
                ^

Error: Debug Failure. False expression: Token end is child end
    at processChildNode (/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:177120:17)
    at /Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:177051:9
    at visitNode2 (/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:31743:18)
    at forEachChildInJsxAttribute (/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:32121:45)
    at forEachChild (/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:32264:35)
    at processNode (/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:177048:5)
    at processChildNode (/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:177127:7)
    at processChildNodes (/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:177170:32)
    at /Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:177064:9
    at visitNodes (/Users/bjz/work/canva/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:31748:14)

Node.js v20.18.0

I don't know what caused it because there was no information dumped out -- i.e. no filename, no line number, nothing :(

Request:
Add error handling to catch the errors to aid with debugging.

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

No branches or pull requests

1 participant