i-VRESSE / haddock3-ui

Reusable React components from Haddock3 webapp
https://i-vresse.github.io/haddock3-ui/
Apache License 2.0
0 stars 0 forks source link

Trying to get example.html files to work #5

Closed sverhoeven closed 1 month ago

sverhoeven commented 1 month ago

Need to try

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 15.05%. Comparing base (1adfa4b) to head (5d623f2). Report is 6 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5 +/- ## ======================================= Coverage 15.05% 15.05% ======================================= Files 15 15 Lines 372 372 Branches 84 84 ======================================= Hits 56 56 Misses 233 233 Partials 83 83 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sverhoeven commented 1 month ago

When used in haddock3 webapp get similar error

ReferenceError: React is not defined at SimpleViewer (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-6QWSZTNW.js?v=7acf1e18:46924:3) at renderWithHooks (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:11568:26) at mountIndeterminateComponent (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:14946:21) at beginWork (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:15934:22) at beginWork$1 (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:19781:22) at performUnitOfWork (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:19226:20) at workLoopSync (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:19165:13) at renderRootSync (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:19144:15) at recoverFromConcurrentError (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:18764:28) at performSyncWorkOnRoot (http://0.0.0.0:3000/node_modules/.vite/deps/chunk-J7ZSQJXM.js?v=7acf1e18:18907:28)

See https://github.com/i-VRESSE/haddock3-webapp/pull/149

sverhoeven commented 1 month ago

Seems like v0.2.0 release is broken, but files in node_modules/@i-vresse/haddock3-ui/dist/ do not use React.createElement, while remix/vite is pushing React.* to the browser.

Commit https://github.com/i-VRESSE/haddock3-ui/pull/5/commits/0c8039201b12b25ba085e3f24682020f431e6c11 fixed after build + copying dist folder haddock3-webapp. The haddock3-webapp build+start works and after rm node_modules/.vite the npm run dev also works.