Our blazing fast Grid component built with pure JavaScript


Post by SemFA »

Hello,

I've updated both grid and calendar to v4.2.0 and it broke the grid. I think the calendar is including something from grid.module.js while grid-react uses grid.umd.js. This crashes.

I've included a react-app example. can simply run npm install && npm start to test.

here's the error:

grid.umd.js:41087 Uncaught Error: Bryntum bundle included twice, check cache-busters and file types (.js).
Simultaneous imports from "*.module.js" and "*.umd.js" bundles are not allowed.
    at Function.setVersion (grid.umd.js:41087)
    at Module../lib/Core/Base.js (grid.umd.js:1994)
    at __webpack_require__ (grid.umd.js:39)
    at Module../webpack/webpack.core.entry.js (grid.umd.js:155295)
    at __webpack_require__ (grid.umd.js:39)
    at Module../webpack/webpack.entry.js (grid.umd.js:155962)
    at __webpack_require__ (grid.umd.js:39)
    at Module../webpack/webpack.entry.umd.js (grid.umd.js:156577)
    at __webpack_require__ (grid.umd.js:39)
    at grid.umd.js:103
    at grid.umd.js:104
    at webpackUniversalModuleDefinition (grid.umd.js:11)
    at Object../node_modules/@bryntum/grid/grid.umd.js (grid.umd.js:19)
    at __webpack_require__ (bootstrap:851)
    at fn (bootstrap:150)
    at Module../node_modules/@bryntum/grid-react/WrapperHelper.js (WrapperHelper.js:1)
    at __webpack_require__ (bootstrap:851)
    at fn (bootstrap:150)
    at Module../node_modules/@bryntum/grid-react/index.js (index.js:1)
    at __webpack_require__ (bootstrap:851)
    at fn (bootstrap:150)
    at Module.<anonymous> (bryntum-calendar.js:4)
    at Module../src/grid.js (grid.js:8)
    at __webpack_require__ (bootstrap:851)
    at fn (bootstrap:150)
    at Module.<anonymous> (main.chunk.js:16)
    at Module../src/App.js (App.js:14)
    at __webpack_require__ (bootstrap:851)
    at fn (bootstrap:150)
    at Module.<anonymous> (grid.js:8)
    at Module../src/index.js (index.js:7)
    at __webpack_require__ (bootstrap:851)
    at fn (bootstrap:150)
    at Object.1 (index.js:7)
    at __webpack_require__ (bootstrap:851)
    at checkDeferredModules (bootstrap:45)
    at Array.webpackJsonpCallback [as push] (bootstrap:32)
    at main.chunk.js:1
Attachments
bryntum-example.zip
(438.89 KiB) Downloaded 95 times

Post by saki »

This is the same problem as in the other thread viewtopic.php?f=43&t=17892 which contains the explanation and links to the tickets to the final solution.

As a workaround, use the approach from the attached file. Beware, it is not a public solution, nor a recommended practice it is just a dirty workaround until we implement the final solution. The key lies in public/index.html the last <script> section of the head.

Attachments
bryntum-example.zip
(8.28 KiB) Downloaded 163 times

Post by SemFA »

saki wrote: Wed Jun 30, 2021 3:11 pm

This is the same problem as in the other thread viewtopic.php?f=43&t=17892 which contains the explanation and links to the tickets to the final solution.

As a workaround, use the approach from the attached file. Beware, it is not a public solution, nor a recommended practice it is just a dirty workaround until we implement the final solution. The key lies in public/index.html the last <script> section of the head.

Thank you, this fixed my issue in the linked thread as well. Once a fix in v5 is released, I will remove the temp fix. Thanks for the workaround :).


Post Reply