gcanti / tcomb-form

Forms library for react
https://gcanti.github.io/tcomb-form
MIT License
1.16k stars 136 forks source link

Uncaught TypeError: [tcomb] Invalid call to mixin(target, source, [overwrite]): cannot overwrite property "ValidationError" of target object #302

Closed volkanunsal closed 8 years ago

volkanunsal commented 8 years ago

Version

Tell us which versions you are using:

Simply importing the module should not throw this error.

Actual behaviour

...but it does.

Steps to reproduce

Simply import the module. That's it.

Console log (optional)

Uncaught TypeError: [tcomb] Invalid call to mixin(target, source, [overwrite]): cannot overwrite property "ValidationError" of target object
gcanti commented 8 years ago

Hi @volkanunsal,

I can't reproduce this error just importing the package. Could you please provide more details? Maybe the stack trace. It would help a lot if you enable the debugger ("Pause on exceptions" in the "Source" panel of Chrome dev tools) and spot the place where the error is thrown

volkanunsal commented 8 years ago

I can't either anymore. Most likely tcomb-validation wasn't installed in the first time I tried it because I'd used npm update .

FranckErnewein commented 6 years ago

I get exactly the same bug, I remove my node_modules and run a new npm install, everything is fine now.

@gcanti unfortunately I didn't inspect the stack trace to tell you more information before :( installed version:

"tcomb": "^3.2.16",
"tcomb-form": "^0.9.17",
"tcomb-form-types": "^1.1.0",
"tcomb-react": "^0.9.3",
"tcomb-validation": "^3.4.0",
shide1989 commented 5 years ago

Thanks @FranckErnewein, npm i worked for me (with following command) : rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm i i also relaunched the terminal