N
Novu•2y ago
dr.really

[0.10.0] o.div is not a function

Getting the following after upgrading everything to 0.10.0, comment out all thinks from the @novu/notification-center and the error goes away:
TypeError: o.div is not a function
at Object.<anonymous> (<redacted>\node_modules\.pnpm\@novu+notification-center@0.10.0_2zx2umvpluuhvlq44va5bta2da\node_modules\@novu\notification-center\src\components\notification-center\components\layout\header\Header.tsx:99:28)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (D:\code\monorepo\firefly\apps\web\app\routes\__admin.tsx:7:30)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
TypeError: o.div is not a function
at Object.<anonymous> (<redacted>\node_modules\.pnpm\@novu+notification-center@0.10.0_2zx2umvpluuhvlq44va5bta2da\node_modules\@novu\notification-center\src\components\notification-center\components\layout\header\Header.tsx:99:28)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (D:\code\monorepo\firefly\apps\web\app\routes\__admin.tsx:7:30)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
20 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Paweł T.
Paweł T.•2y ago
hey @dr.really 👋 I've checked if it works on the fresh CRA with the latest notification-center package, and it looks like everything is fine. I think that you might have a node_modules issues, so my suggestion is try to remove it and install deps again. The issue is kind of related to that we've switched from the styled-components to the @emotion/styled package.
Novu_Bot
Novu_Bot•2y ago
@paweltymczuk, you just advanced to level 12!
dr.really
dr.really•2y ago
giving that a shot now 🙂
Paweł T.
Paweł T.•2y ago
@dr.really Did it solve the issue?
dr.really
dr.really•2y ago
that was it! thank you!
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
dr.really
dr.really•2y ago
So once I added everything back into the app, I too got the same error message popping back up. @paweltymczuk cleared node modules again, and running into the same issue. I looked and you did a CRA, but I'm using Remix, so might be an issue with ssr?
Paweł T.
Paweł T.•2y ago
@amosbastian @dr.really question: do you both use styled-components in your projects?
dr.really
dr.really•2y ago
I use remix with mantine Mantine v5.9 Remix v1.8
Paweł T.
Paweł T.•2y ago
I was able to reproduce the issue, I'm trying to find the fix
dr.really
dr.really•2y ago
No worries, thank you for your help! I'll be heading to bed soon, any more info you need from me?
Paweł T.
Paweł T.•2y ago
for now I'm fine. thx
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Paweł T.
Paweł T.•2y ago
@amosbastian @dr.really I've found the issue and was able to fix and verify in both Remix and NextJS apps... but still need to figure our the root issue with the @emotion/styled import after the transpilation to CJS
dr.really
dr.really•2y ago
you are awesome Can we get this PR reviewed and merged? This is stopping us from using the notification center in our application entirely :/
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
DavidSouthmountain
DavidSouthmountain•2y ago
this will go into the patch we will release soon 🙂
Dima Grossman
Dima Grossman•2y ago
Releasing the patch today 🙏