Using JSROOT 7 with modern frontend libraries
See original GitHub issueHi,
It’s great to see that JSROOT now uses ES modules in the code. It seems to work fine in the web browser (with script[type="module"]
) and also with Node.js but I can’t make it work with TypeScript and Angular.
I am trying to update our setup in Phoenix (HSF/phoenix#422) to adapt to the new JSROOT version but the imports are not working correctly.
import { openFile } from 'jsroot/io'
doesn’t work because it doesn’t recognize the specified exports inpackage.json
.- If I try to import through the package using
import { openFile } from 'jsroot/modules/io.mjs'
, I get the following error.
I get the same error when trying to compile with webpack.Error: Module not found: Error: Package path ./mo/modules/io.mjs is not exported from package D:\Repos\phoenix\node_modules\jsroot (see exports field in D:\Repos\phix\oenix\node_modules\jsroot\package.json)
- Importing the file directly using
import { openFile } from '../../../../node_modules/jsroot/modules/io.mjs'
gives a lot of errors mainly related to Node.js dependencies likefs
,path
etc.
Do you have any idea how to make JSROOT 7 work in a TypeScript and Angular setup?
Issue Analytics
- State:
- Created a year ago
- Comments:33 (26 by maintainers)
Top Results From Across the Web
Syntax highlighting library support for modern frontend ...
I was going to write a post about Svelte and I was checking if it is a language that is supported by the...
Read more >What Are The Best Frontend Frameworks To Use In 2022?
Compare pros and cons of the best frontend frameworks of 2022: React, Angular, Amber, Vue.js, Svelte, jQuery, Backbone, and Semantic UI.
Read more >UI library development in the frontend wonderland - Medium
In this post I'll take you through my journey building Yotpo's UI Library — Yotpo's Design System Component Library, the research, the ...
Read more >Top 10 Popular Frontend Frameworks to Use in 2022
Studies show that the best front-end frameworks are React, Vue, Angular, Svelte, JQuery, Ember, Backbone, Semantic UI, Foundation, ...
Read more >JavaScript code to an read object from the ROOT file
EVE-7 is a rewrite of EVE for the ROOT-7 era, using modern C++ and ... is based on the FairRoot package while its...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@AlbertoPdRF, may be you create new issue?
It’s free, you can get it from https://code.visualstudio.com/