-
Notifications
You must be signed in to change notification settings - Fork 698
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: dispatcher.getOwner is not a function
thrown when rendering an email template with React 19 RC
#1790
Comments
By tracing the error I noticed this has to do with node_modules/react/jsx-runtime.js 'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-jsx-runtime.production.js');
} else {
module.exports = require('./cjs/react-jsx-runtime.development.js');
} node_modules/react/cjs/react-jsx-runtime.production.js "use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd; node_modules/react/cjs/react-jsx-runtime.development.js ...
return describeUnknownElementTypeFrameInDEV(type(prototype));
} catch (x) {}
}
return "";
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
... Notice how the production version does not have This leaves me to question whether I configuring something incorrectly or if this is a real bug. Please let me know. |
This seems like an oddly specific issue, we'll need a minimal reproduction for it. Can you make one? |
I am having the same problem, does anyone have a solution? |
I also have this issue. Can't really find anything online... |
The same issue |
remix-run/react-router#12138 provides a fix |
Describe the Bug
The following error is thrown when rendering an email template in a containerized Next.js 15 application using React 19.0.0-rc.
Interestingly rendering works completely free of errors when running a dev server. I am using the following packages and versions.
Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
none
To Reproduce
Calling render from causes the error. The second log statement is never executed in the below example.
I also tried:
Expected Behavior
I expect the render function to produce the rendered HTML code without throwing an error.
What's your node version? (if relevant)
20.10.0
The text was updated successfully, but these errors were encountered: