-
Notifications
You must be signed in to change notification settings - Fork 56
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
TypeError: Cannot read property 'superClass' of undefined #43
Comments
@capaj Wow ! first of all, thanks for the PR and the issue! Can you please post the snippet you've tried to refactor? Thanks! |
I actually get this error whenever I focus any code at all. It doesn't even have to be a stateless component. I got it even with a bash script, with html template, with whatever you can think of. |
I see. Does it happen when you select a valid component though? If so, can u post a snippet? |
Getting this problem as well. Downgraded to 4.2.2 just to to see if an older version helps. It gives the same error so I think it might either be a problem with a new VSCode update or a conflicting extension. |
Also getting this error with VSCode [2019-03-29 12:43:36.449] [exthost] [error] [wix.glean] provider FAILED
[2019-03-29 12:43:36.450] [exthost] [error] TypeError: Cannot read property 'superClass' of undefined
at isSupportedComponent (/Users/petepetrash/.vscode/extensions/wix.glean-4.10.1/out/modules/stateful-to-stateless.js:303:28)
at Object.isStatefulComp (/Users/petepetrash/.vscode/extensions/wix.glean-4.10.1/out/modules/stateful-to-stateless.js:310:9)
at CompleteActionProvider.provideCodeActions (/Users/petepetrash/.vscode/extensions/wix.glean-4.10.1/out/extension.js:39:37)
at define.provideCodeActions.a.asPromise (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:564:641)
at t.asPromise.Promise (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:48:58)
at new Promise (<anonymous>)
at Object.t.asPromise (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:48:32)
at I.provideCodeActions (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:564:612)
at define.$provideCodeActions._withAdapter.e (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:580:417)
at $._withAdapter (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:575:502)
at $provideCodeActions (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:580:395)
at h._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:593:118)
at h._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:592:777)
at h._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:591:383)
at h._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:590:279)
at define.constructor._protocol.onMessage.e (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:588:565)
at u.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:43:254)
at e (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:39:64)
at u.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:43:254)
at s (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:168:754)
at Socket.define.constructor._socketDataListener.e (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:168:960)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
at addChunk (_stream_readable.js:279:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onread (net.js:636:20)
[2019-03-29 12:43:36.725] [exthost] [info] ExtensionService#_doActivateExtension vscode.extension-editing {"startup":false,"activationEvent":"onLanguage:typescript"}
[2019-03-29 12:43:36.725] [exthost] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/extension-editing/dist/extension |
Hey @petekp , can you post the snipper u've tried refactoring? |
@borislit I'm unable to use the plugin — the commands aren't accessible / don't show up since the plugin doesn't appear to load when my extensions are activated. |
@petekp hmmm odd. Can you post the React snipper u've tried to refactor? |
Having the same issue here on React memo's
|
@TimCluyts You are getting this error when You select the snippet? |
@borislit When I put my cursor on memo, but even when I just open the file itself.
This is just on top of the |
@TimCluyts Ok, I can reproduce! The fix is on its way :) |
## [4.10.2](v4.10.1...v4.10.2) (2019-04-09) ### Bug Fixes * **stateful-to-stateless:** Fixes [#43](#43) ([6d12723](6d12723))
🎉 This issue has been resolved in version 4.10.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
@TimCluyts can you verify the issue is resolved? |
@TimCluyts BTW, What refactoring did you try to perform on the memo component? Perhaps its something we should support |
I just created a fix for the issue described above. |
@borislit any chance of merging it? I am having to disable Glean because of these issues. |
@TimCluyts Sure. Ill review and merge right away |
@TimCluyts Done! Thanks for your contribution! |
https://github.com/wix/vscode-glean/blob/7d6791f9595bb9be4e5619f566c7c67276599d87/src/modules/jsx.ts#L166
I think that line needs another guard because I am seeing:
The code I am looking at is just a simple stateless component.
Version 4.2.3
The text was updated successfully, but these errors were encountered: