Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: inferno-compat 1.3.0-rc.2 breaks react-hot-loader #818

Closed
menberg opened this issue Feb 8, 2017 · 7 comments
Closed

TypeError: inferno-compat 1.3.0-rc.2 breaks react-hot-loader #818

menberg opened this issue Feb 8, 2017 · 7 comments

Comments

@menberg
Copy link
Contributor

menberg commented Feb 8, 2017

Observed Behaviour

I'm using react-hot-loader with inferno-compat, it worked until 1.2.2. With 1.3.0-rc.3 (correction: rc.2), I get an Uncaught TypeError: Cannot set property createElement of #<Object> which has only a getter
on line React.createElement = patchedCreateElement;

Expected Current Behaviour

inferno-compat 1.3.0 should work with react-hot-loader 3.0.0-beta.6 like before.

Inferno Metadata

macOS Sierra / Chrome / SSR enabled

@Havunen
Copy link
Member

Havunen commented Feb 8, 2017

Hi @menberg thanks for letting us know about this issue.

Are you using rc.2 or rc.1 rc.3 is not released? Also can you give minimal steps to reproduce please.

@menberg menberg changed the title TypeError: inferno-compat 1.3.0-rc.3 breaks react-hot-loader TypeError: inferno-compat 1.3.0-rc.2 breaks react-hot-loader Feb 8, 2017
@menberg
Copy link
Contributor Author

menberg commented Feb 8, 2017

Hi @Havunen, thanks for checking in. I've prepared a repository to reproduce the bug. It's found under https:/menberg/inferno-issue-818

Does this help to debug the issue? Thanks for letting me know and best regards.

@Havunen
Copy link
Member

Havunen commented Feb 8, 2017

Thanks for creating the repo, I will have a look soon.

@Havunen
Copy link
Member

Havunen commented Feb 8, 2017

It looks like "React" defined so that those properties are getters... I can't find anything from the source files related to this change. Maybe it has something to do with how we build stuff, ping @longlho

@longlho
Copy link
Member

longlho commented Feb 22, 2017

kk will take a look

@longlho
Copy link
Member

longlho commented Feb 22, 2017

issue is that webpack decides to define getters for harmony exports:

/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};

trying to figure out a fix

@Havunen
Copy link
Member

Havunen commented Feb 23, 2017

I Dropped module entry point due to many issues it raises, this will be fixed in next RC.

@Havunen Havunen closed this as completed Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants