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

Unable to use default export in current jbrowse-plugin-template #45

Open
cmdcolin opened this issue Dec 20, 2023 · 1 comment
Open

Unable to use default export in current jbrowse-plugin-template #45

cmdcolin opened this issue Dec 20, 2023 · 1 comment

Comments

@cmdcolin
Copy link
Contributor

cmdcolin commented Dec 20, 2023

import Plugin from '@jbrowse/core/Plugin'
import FeatureRendererType from '@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType'

console.log({ FeatureRendererType })

class DoesntWork extends FeatureRendererType {}

export default class TemplatePlugin extends Plugin {
  name = 'TemplatePlugin'

  install() {
    // @ts-expect-error
    const t = new DoesntWork({})
    console.log(t)
  }

  configure() {}
}

the output of the console.log shows that the "default export" is on FeatureRendererType.default

@cmdcolin
Copy link
Contributor Author

might also even occur without default exports sometimes

user reported

"import { FeatureRendererType } from "@jbrowse/core/pluggableElementTypes/renderers""
But I kept getting:
"TypeError: CoreRender requires a renderer that is a subclass of ServerSideRendererType"

And putting this instead fixed it, similar to the other case:
"import { FeatureRendererType } from '@jbrowse/core/pluggableElementTypes'"

I've got rectangles for genes now! Once the imports and everything are in place the drawing isn't too bad, I'll work on it a bit tomorrow.

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