Premium support for our pure JavaScript UI components


Post by yuriv »

Hi,

I'm trying to upgrade from 4.0.8 to 4.1.0-beta-3 now and having problems:

1) Missing @bryntum/gantt-react package.

Before it was called bryntum-react-shared and lived in /examples/react/_shared.

Currently in examples/frameworks/react/readme.md I see this:

The example uses packages from the Bryntum private NPM repository. You must be logged-in to this repository as a
licensed or trial user to access the packages.
See Npm Packages Guide for detailed information on the
sign-up/login process.

But https://bryntum.com/docs/gantt/#guides/packages.md is 404.

So where to get @bryntum/gantt-react?

2) In gantt.d.ts you should fix:

declare module "bryntum-gantt" {

=>

declare module '@bryntum/gantt' {

Post by saki »

The Npm Packages Guide will go on-line with the stable release.

For this beta, you can find it in the unzipped folder structure in docs/guides/npm-repository.md.

You can also read: https://npm.bryntum.com/-/web/detail/@bryntum/welcome


Post by yuriv »

I'm getting bad username/password, access denied when trying to login. Using my Bryntum customer zone credentials exactly according to the guide, with .. instead of @ in username field.


Post by saki »

This sequence, right?

$ npm config set @bryntum:registry https://npm.bryntum.com
$ npm login --registry=https://npm.bryntum.com
  Username: user..yourdomain.com
  Password: your-customer-zone-password
  Email: (this IS public) user@yourdomain.com

Does ~/.npmrc contain something like:

@bryntum:registry=https://npm.bryntum.com
//npm.bryntum.com/:_authToken=xxxxx

Can you login on web at https://npm.bryntum.com/ ?


Post by yuriv »

Tried it today and it works with npm. But still not works with yarn (which we use for our projects. This is what I get:

yarn-err.png
yarn-err.png (18.46 KiB) Viewed 1386 times

In .yarnrc I have:

"@bryntum:registry" "https://npm.bryntum.com"

Attached yarn-err.log

Attachments
yarn-error.log
(468.35 KiB) Downloaded 75 times

Post by mats »

We are still working on yarn support, not quite done yet.


Post by yuriv »

I dropped yarn and old Bryntum packages, switched to npm, installed Bryntum packages from your new npm registry and now getting this error:

bryntum-bundle-included-twice.png
bryntum-bundle-included-twice.png (36.68 KiB) Viewed 1384 times

This is all Bryntum imports I have in my app:

bryntum-imports.png
bryntum-imports.png (78.61 KiB) Viewed 1384 times

Any ideas how to fix this?


Post by saki »

Our packages use UMD versions of Gantt:

import { Xxxx } from '@bryntum/gantt/gantt.umd';

You need to import from the same bundle everywhere in you app. The error Bundle included twice means that both UMD and module version is imported.

Search and replace in your code and the issue will resolve.


Post by saki »

One more info: It is not necessary, and not recommended, to use our components directly without wrappers. Wrappers are now auto-generated and they support all public config options, properties and events. Therefore, we advise to use them everywhere:

import { BryntumCombo, BryntumTextField, BryntumGantt} from '@bryntum/gantt-react'

and use them:

<BryntumCombo {...comboConfig} />
<BryntumTextField {...fieldConfig} />
<BryntumGantt {...ganttConfig} />

As a rule of thumb, you shouldn't need to use new Gantt({...}) (or any other Bryntum component) directly in your code.


Post by yuriv »

Thanks, importing gantt.umd fixed the issue. Regarding wrappers etc. I don't think it's relevant for us, all the imports you saw on my picture are made for setting types, not for instantiating classes.


Post Reply