Open rafaeltuelho opened 2 years ago
found this old issue on uniforms projects repo but it was related to metor. Not sure if it applies to patternfly and/or aerogear: https://github.com/vazco/uniforms/issues/433
This happened to me often in the past, it's likely caused by multiple versions of uniforms
in your project. You can check it using nvm ls uniforms
or yarn why uniforms
.
If you have multiple versions of it, you should try to pin the dependencies so as to have all the versions aligned. I rarely managed to fix the problem this way, but it might help you.
I had the same issue as @rafaeltuelho
I did not have multiple versions of uniforms:
$ npm ls uniforms
patternfly-seed@0.0.2 /Users/mmortari/git/... .../demogui
├─┬ uniforms-bridge-json-schema@3.7.0
│ └── uniforms@3.7.0 deduped
├─┬ uniforms-patternfly@4.7.4
│ └── uniforms@3.7.0 deduped
├─┬ uniforms-unstyled@3.7.0
│ └── uniforms@3.7.0 deduped
└── uniforms@3.7.0
It seems to me instead using import as:
import { AutoForm } from "uniforms-patternfly/dist/es6";
solved the Class constructor AutoForm cannot be invoked without 'new'
problem for me.
Thanks for pointing this out @tarilabs . Will give it a try.
my project dependencies are:
and I'm getting the following error when using
AutoForm
fromuniforms-patternfly