Our state of the art Gantt chart


Post by bbigelow »

I'm having a hell of a time getting the trial NPM packages off the ground in our standard stack to even assess the library.

    
"@bryntum/gantt-react": "^4.2.6", "@bryntum/gantt": "npm:@bryntum/gantt-trial@4.2.6",

Stack:

Babel 7
Webpack 5
React 17

I always end up with:

10% building 0/4 entries 22/28 dependencies 2/14 modules/Users/bigelobr/Repos/grid-ui/node_modules/@bryntum/gantt-react/index.js:4
import './WrapperHelper.js';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1053:16)
    at Module._compile (internal/modules/cjs/loader.js:1101:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)

Is there a secret I'm missing?


Post by saki »

Did you use create-react-app to create the React application? If not, we would need a sample that would reproduce the problem and that we could debug and fix.


Post by bbigelow »

No, it's a custom Webpack config. It would probably take quite awhile to strip this down to a minimum viable repo to avoid releasing proprietary code.


Post by saki »

package.json, webpack config with a simple App.js would do. The error is before running anything, I suppose. We need something in hands to work with. Is it feasible to prepare a sample for us?


Post by bbigelow »

Not really sure.

Could this be a SSR rendering thing? Any example projects implementing trial using webpack and renderToString from react-dom/server?


Post by mats »

Could this be a SSR rendering thing?

Possibly, we've seen reports of SSR incompatibilities and users worked around it like here viewtopic.php?p=87581#p87581

Not sure it's the same thing you are facing. A minimal test case would make it easy for us to get it working most likely.


Post by bbigelow »

I think I've finally found a way around this using @loadable/component to bundle Bryntum separately and lazy load it.


Post by mats »

That's great, I hope all is working well now. If not, please let us know and we'll try our best to help!

We'll discuss if there's something we can do to support your initial configuration (if you're able to drop us a minimal test case that'd be gold)


Post Reply