Skip to content

Cannot read property 'length' of undefined #44105

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

Closed
elibarzilay opened this issue May 15, 2021 · 0 comments · Fixed by #44106
Closed

Cannot read property 'length' of undefined #44105

elibarzilay opened this issue May 15, 2021 · 0 comments · Fixed by #44106
Assignees

Comments

@elibarzilay
Copy link
Contributor

Imported from microsoft/tsserverfuzzer#314

Repo Name: https://github.com/yarnpkg/yarn.git

Revision: 3119382885ea373d3c13d6a846de743eca8c914b

TypeScript Version: 4.3.0-dev.20210410

Commands:

{"response":[],"responseRequired":true}
{"command":"format","arguments":{"endLine":3,"endOffset":1,"line":3,"offset":1,"file":"D:/local/Temp/fuzzerWorkingDir/yarn/src/util/normalize-manifest/licenses.js","options":{}},"type":"request","seq":26}
{"response":[],"responseRequired":true}
{"command":"getCodeFixes","arguments":{"errorCodes":[1],"startLine":3,"startOffset":1,"endLine":3,"endOffset":1,"file":"D:/local/Temp/fuzzerWorkingDir/yarn/src/util/normalize-manifest/licenses.js"},"type":"request","seq":27}
{"response":[],"responseRequired":true}
{"command":"getApplicableRefactors","arguments":{"startLine":3,"startOffset":1,"endLine":3,"endOffset":1,"file":"D:/local/Temp/fuzzerWorkingDir/yarn/src/util/normalize-manifest/licenses.js"},"type":"request","seq":27}
{"response":[{"name":"Convert export","description":"Convert default export to named export","actions":[{"name":"Convert default export to named export","description":"Convert default export to named export","kind":"refactor.rewrite.export.named"}]}],"responseRequired":true}
{"command":"getApplicableRefactors","arguments":{"startPosition":30,"endPosition":31,"file":"D:/local/Temp/fuzzerWorkingDir/yarn/src/util/normalize-manifest/licenses.js"},"type":"request","seq":28}
{"response":[{"name":"Convert export","description":"Convert default export to named export","actions":[{"name":"Convert default export to named export","description":"Convert default export to named export","kind":"refactor.rewrite.export.named"}]}],"responseRequired":true}
{"command":"getEditsForRefactor-full","arguments":{"refactor":"Convert export","action":"Convert default export to named export","startPosition":30,"endPosition":31,"file":"D:/local/Temp/fuzzerWorkingDir/yarn/src/util/normalize-manifest/licenses.js"},"type":"request","seq":29}
(Showing last 10 of 96829 commands)

Code (src\util\normalize-manifest\licenses.js):

  /* @flow */
  
  /* eslint-disable max-len */
//                 ^
  
  /**

Hash: 118a1b4b6ad0276ad98f166743ace4f4
Stack trace:

Cannot read property 'length' of undefined
    at escapeLeadingUnderscores (tsserverlibrary.js:12173:28)
    at createBaseIdentifier (tsserverlibrary.js:21609:35)
    at createIdentifier (tsserverlibrary.js:21621:24)
    at makeExportSpecifier (tsserverlibrary.js:148021:143)
    at changeExport (tsserverlibrary.js:147894:32)
    at doChange (tsserverlibrary.js:147886:13)
    at <anonymous> (tsserverlibrary.js:147833:94)
    at ChangeTracker.with (tsserverlibrary.js:138743:17)
    at getEditsForAction (tsserverlibrary.js:147833:62)
    at getEditsForRefactor (tsserverlibrary.js:139972:41)
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

Successfully merging a pull request may close this issue.

1 participant