Deadly0 / final-form-material-ui

A set of wrapper components to facilitate using Material UI with Final Form
92 stars 33 forks source link

Reference Error of windows not defined errors #10

Open efleurine opened 5 years ago

efleurine commented 5 years ago

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

efleurine commented 5 years ago

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

IskanderMustafin commented 5 years ago

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

jsphweid commented 5 years ago

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 :/

andrefox333 commented 5 years ago

Updates? Gatsby is definitely blowing up on production build.

octopusOnJellyfish commented 5 years ago

Nextjs has the same issue

de3web commented 3 years ago

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

lookfirst commented 3 years ago

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