final-form-material-ui icon indicating copy to clipboard operation
final-form-material-ui copied to clipboard

Reference Error of windows not defined errors

Open efleurine opened this issue 6 years ago • 7 comments

By just doing a import { TextField } from "final-form-material-ui"; I am gettting a Reference Error of windows which is not defined.

efleurine avatar Mar 13 '19 21:03 efleurine

I imported the original TextField from material-ui and it works without problems.

efleurine avatar Mar 13 '19 23:03 efleurine

Experiencing same error during SSR. I think root of the problem in webpack's config: libraryTarget: 'umd'. Probably need to change to: libraryTarget: 'commonjs'

IskanderMustafin avatar Mar 23 '19 14:03 IskanderMustafin

This is happening to me using Gatsby, unfortunately (which statically renders). Hopefully the fix is as easy as changing the webpack config. For now I'm manually getting by by simply copying and pasting the code from this lib into my project :/

jsphweid avatar Apr 07 '19 19:04 jsphweid

Updates? Gatsby is definitely blowing up on production build.

andrefox333 avatar Jul 24 '19 15:07 andrefox333

Nextjs has the same issue

octopusOnJellyfish avatar Jul 25 '19 21:07 octopusOnJellyfish

Gatsby issues here as well, had to stop using the library. Hopefully 2021 is the year!

de3web avatar Dec 17 '20 22:12 de3web

@de3web Just a friendly reminder that there is another library you can use now. Maintained and tested.

lookfirst avatar Dec 18 '20 00:12 lookfirst