fable-compiler / fable-react

Fable bindings and helpers for React and React Native
MIT License
275 stars 66 forks source link

module.hot.addStatusHandler is not a function #210

Closed albertwoo closed 3 years ago

albertwoo commented 3 years ago

When use fable 3 I got below error:

Uncaught TypeError: module.hot.addStatusHandler is not a function at Fable.React.FunctionComponent.fs.js:23

alfonsogarciacaro commented 3 years ago

Thanks for reporting @albertwoo! I surrounded the code with a try ... catch. Can you please try with latest release (7.1.0)?

albertwoo commented 3 years ago

Got new error: Error FS0193 The module/namespace 'Fable.React' from compilation unit 'Fable.React' did not contain the namespace, module or type 'ReactElement'

alfonsogarciacaro commented 3 years ago

Strange, I'm trying Fable.React 7.1.0 in a production project and is working fine. Can you try with latest Fable 3 (rc-010) and also removing the obj folder just in case?

albertwoo commented 3 years ago

@alfonsogarciacaro the fable compiler works fine, but if I use VS 2019 to build it then I got the error. You can use https://github.com/albertwoo/FablePlayground/tree/210 branch 210 to reproduce.

Titaye commented 3 years ago

Same here, dotnet fable compiles fine but dotnet build is not working (and intellisense in ionide is also complaining)

alfonsogarciacaro commented 3 years ago

Damn, so moving types to a separate assembly cause errors. Seems if we want to do this we need to publish a new major version and update all libraries depending on Fable.React... For now I just republished Fable.React with the interfaces back, can you please try?

Titaye commented 3 years ago

Everything is ok for me with version 7.2.0. dotnet build is working

albertwoo commented 3 years ago

It works for me too. 👍