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
TypeError: Cannot read properties of undefined (reading 'sourceFile')
at isDocumentRegistryEntry (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:142504:18)
at getDocumentRegistryEntry (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:142580:19)
at Object.releaseDocumentWithKey (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:142675:19)
at Object.getOrCreateSourceFileByPath [as getSourceFileByPath] (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:151555:30)
at tryReuseStructureFromOldProgram (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:126294:59)
at createProgram (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:125689:23)
at synchronizeHostDataWorker (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:151491:15)
at synchronizeHostData (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:151386:7)
at Object.getProgram (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:151568:5)
at ConfiguredProject2.updateGraphWorker (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:186518:41)
at ConfiguredProject2.updateGraph (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:186353:32)
at ConfiguredProject2.updateGraph (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:187646:24)
at updateWithTriggerFile (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:188190:11)
at updateConfiguredProject (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:188198:9)
at updateProjectFoundUsingFind (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:188133:28)
at _ProjectService.findCreateOrReloadConfiguredProject (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:190784:62)
at _ProjectService.tryFindDefaultConfiguredProjectForOpenScriptInfo (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:190819:25)
at _ProjectService.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:190977:25)
at _ProjectService.assignProjectToOpenedScriptInfo (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:190730:27)
at _ProjectService.openClientFileWithNormalizedPath (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:191088:48)
at _ProjectService.openClientFile (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:190638:17)
at openClientFile (/home/markuss/projects/test/new-app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js:113:40)
at openClientFileAndMaybeReload (/home/markuss/projects/test/new-app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js:118:22)
at openClientFileFromProjectService (/home/markuss/projects/test/new-app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js:68:20)
at useProgramFromProjectService (/home/markuss/projects/test/new-app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js:185:9)
at getProgramAndAST (/home/markuss/projects/test/new-app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/typescript-estree/dist/parser.js:44:100)
at parseAndGenerateServices (/home/markuss/projects/test/new-app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/typescript-estree/dist/parser.js:154:11)
at Object.parseForESLint (/home/markuss/projects/test/new-app/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@typescript-eslint/parser/dist/parser.js:101:80)
at Object.parseForESLint (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]_t_vb2dmusjgka2eyua64avbrjc34/node_modules/ember-eslint-parser/src/parser/gjs-gts-parser.js:55:30)
at Object.parse (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/languages/js/index.js:270:26)
at ParserService.parseSync (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/services/parser-service.js:36:33)
at #flatVerifyWithoutProcessors (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1669:47)
at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1993:49)
at /home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1609:29
at Array.map (<anonymous>)
at Linter._verifyWithFlatConfigArrayAndProcessor (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1604:36)
at Linter._verifyWithFlatConfigArray (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:2069:25)
at Linter.verify (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1543:61)
at Linter.verifyAndFix (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:2320:29)
at verifyText (/home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/eslint/eslint.js:327:48)
at /home/markuss/projects/test/new-app/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/eslint/eslint.js:807:40
The
ember-source
v6.1+ ships now by default the flat config for eslint.Unfortuanally i was running into this error:
0:0 error Parsing error: Cannot read properties of undefined (reading 'sourceFile')
Steps to reproduce:
ember new new-app --embroider --pnpm --typescript
.prettierrc.js
totemplateSingleQuote
totrue
pnpm run lint:js
Result:
The error is visible.
Downgrade to typescript 5.5 solve the issue
Discord discussion: https://discord.com/channels/480462759797063690/1328277408910016633
The text was updated successfully, but these errors were encountered: