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

@jbrowse/react-linear-genome-view not working because of @jbrowse/plugin-circular-view #1502

Closed
dreyes17 opened this issue Nov 27, 2020 · 6 comments · Fixed by #1521
Closed
Labels
bug Something isn't working

Comments

@dreyes17
Copy link

When creating a new react app and installing the @jbrowse/react-linear-genome-view it breaks with this error:

Failed to compile.

./node_modules/@jbrowse/plugin-variants/dist/plugin-variants.esm.js
Module not found: Can't resolve '@jbrowse/plugin-circular-view'

The steps to reproduce this bug are

  1. Create a react app using: npx create-react-app
  2. Install @jbrowse/react-linear-genome-view (1.0.1): npm i @jbrowse/react-linear-genome-view
  3. In the auto-generated App.js folder change the contents by (following the tutorial):

import React from 'react'
import 'fontsource-roboto'
import {
createViewState,
createJBrowseTheme,
JBrowseLinearGenomeView,
ThemeProvider,
} from '@jbrowse/react-linear-genome-view'

const theme = createJBrowseTheme()

function View() {
defaultSession = {
name: 'aNameHere', // what the name is doesn't really matter
view: {/* view state here */},
}
const state = createViewState({
assembly,
tracks,
defaultSession,
location: 'ctgA:1105..1221',
onChange: patch => {
console.log('patch', patch)
},
})
return (
<ThemeProvider theme={theme}>
<JBrowseLinearGenomeView viewState={state} />
</ThemeProvider>
)
}

export default View

  1. In the auto-generated replace:
    import App from './App'; with import View from './App';
    and
    <App /> with <View />
@dreyes17 dreyes17 added the bug Something isn't working label Nov 27, 2020
@Akusem
Copy link
Contributor

Akusem commented Nov 30, 2020

I've encountered the same problem, I've tried to install the others @jbrowse npm packages but it hasn't fix the issue

@cmdcolin
Copy link
Collaborator

Yes thanks for reporting....we will probably want to publish our circular plugin for this or refactor the circular renderer out of the variant plugin!

@cmdcolin
Copy link
Collaborator

Currently the circular-view wasn't yet published as a standalone component yet since it was a big lift by itself to get the linear-genome-view published....

@VivekTodur
Copy link

When to expect the update for "react-linear-genome-view" package???

@garrettjstevens
Copy link
Collaborator

We just published another version of our packages (v1.0.2). Unfortunately, the intended fix didn't work exactly as expected, but there is now a simple workaround for this until we can get another version published. To get this to work, add @jbrowse/plugin-circular-view to your dependencies. e.g. in a create-react-app app I tried, the dependencies looked like this:

{
  ...
  "dependencies": {
    "@jbrowse/react-linear-genome-view": "^1.0.2",
    "@jbrowse/plugin-circular-view": "^1.0.2",
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "@types/jest": "^26.0.15",
    "@types/node": "^12.0.0",
    "@types/react": "^16.9.53",
    "@types/react-dom": "^16.9.8",
    "fontsource-roboto": "^3.0.3",
    "react": "^16.9.0",
    "react-dom": "^17.0.1",
    "react-scripts": "4.0.1",
    "typescript": "^4.0.3",
    "web-vitals": "^0.2.4"
  },
  ...
}

Thanks for your patience as we work through these issues.

@garrettjstevens
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants