element.type.toLowerCase is not a function
yasin749 opened this issue · 3 comments
Hii
My console logs:
console.log('tag', element.type);
tag html
tag head
tag title
tag meta
tag meta
tag link
tag meta
tag meta
tag link
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag meta
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag link
tag script
tag link
tag link
tag link
tag link
tag style
tag script
tag script
tag body
tag div
tag div
tag div
tag span
tag span
tag span
tag div
tag button
tag span
tag span
tag canvas
tag span
tag button
tag span
tag span
tag canvas
tag div
tag { '$$typeof': Symbol(react.provider),
_context:
{ '$$typeof': Symbol(react.context),
_calculateChangedBits: null,
_currentValue: false,
_currentValue2: false,
Provider: [Circular],
Consumer: [Circular],
unstable_read: [Function: bound readContext],
_currentRenderer: null,
_currentRenderer2: null } }
2019-10-30T15:27:41.042 [ERROR] (2473:ReactDOMServerRenderer.renderDOM) {TypeError: element.type.toLowerCase is not a function at ReactDOMServerRenderer.renderDOM (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/react-component-caching/development.js:2473:28) at ReactDOMServerRenderer.render (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/react-component-caching/development.js:2466:21) at ReactDOMServerRenderer.read (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/react-component-caching/development.js:2336:21) at Object.renderToString (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/react-component-caching/development.js:2673:31) at /Users/yuysal/workspace/storefront-mobile-ssr/project/build/server/server.js:1:1511583 at tryCatch (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:62:40) at Generator.invoke [as _invoke] (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:288:22) at Generator.prototype.(anonymous function) [as next] (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:114:21) at asyncGeneratorStep (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24) at _next (/Users/yuysal/workspace/storefront-mobile-ssr/project/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)} Request: /; User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1; . element.type.toLowerCase is not a function
"react": "16.5.2",
"react-dom": "16.5.2",
@yasin749 - Did you ever solve this? I'm trying to implement this in my app and am facing the same error, except in my case the first element has type
type: { '$$typeof': Symbol(react.provider), _context: { '$$typeof': Symbol(react.context), _calculateChangedBits: null, _currentValue: undefined, _currentValue2: undefined, _threadCount: 0, Provider: [Circular], Consumer: [Object], _currentRenderer: null, _currentRenderer2: null } },
Naturally toLowerCase is not a function on this... I'm using React and react-dom version "16.12.0". Any confirmation would be appreciated thanks!
Doesn't look like this package is maintained anymore?
I am also seeing the same error.