question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react app and jsroot

See original GitHub issue

I would like to use jsroot in react app. I am using defautl react bundle from https://github.com/facebook/create-react-app and i installed jsroot via npm

In my App component i and doing

import JSROOT from 'jsroot/scripts/JSRootCore'

and i am getting error

./node_modules/jsroot/scripts/JSRootCore.js
Cannot statically analyse 'require(..., ...)' in line 1316

Can you give me hint what do to make it work correctly?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:21 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
mvalacommented, Aug 17, 2018

I just published experimental npm package @obsk/react-jsroot@0.3.0

Source code is here : https://gitlab.openbrain.sk/obsk/react-jsroot There is demo app : https://gitlab.openbrain.sk/obsk/react-jsroot/tree/master/src/demo

1reaction
mvalacommented, Jul 21, 2018

You can test it on https://github.com/mvala/react-jsroot-example . One just do

npm install
npm start

Adn you should be able to reproduce it

Read more comments on GitHub >

github_iconTop Results From Across the Web

@ndmspc/react-jsroot - npm
Made with create-react-library. Latest version: 0.1.1, last published: 2 years ago. Start using @ndmspc/react-jsroot in your project by ...
Read more >
@obsk/react-jsroot: Docs, Tutorials, Reviews | Openbase
obsk/react-jsroot documentation, tutorials, reviews, alternatives, versions, dependencies, community, and more.
Read more >
JavaScript ROOT
JSROOT consists of several libraries (.js files). They are all provided in the ROOT repository and are available in the 'etc/http/scripts/' subfolder. Only...
Read more >
Testing React Js Root Component - Stack Overflow
This has happened to me when I forgot to export one of my components or I imported one of my components incorrectly.
Read more >
createRoot - React Docs
render(<App />);. An app fully built with React will usually only have one createRoot call for its root component. A ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found