Closed vitto-moz closed 2 weeks ago
thank you for the report @vitto-moz!
@scopsy can i work on this one?
Sure @marooncoder09 Assigning this to you!
Sure @marooncoder09 Assigning this to you!
thanks
Can I work on this issue?
@marooncoder09 Just checking if you are still working on this. If not assign it to me
I'm facing the exact same issue, I got around 170 warnings due to missing files Anyone got an update on this ?
@pruthvirajjadhav1 are still willing to take a look at that? Let me know so I can assign you 🙏
@scopsy Can I try to fix the issue?
@ankur0904 Good thanks, let me known if you need something related to this issue ;)
@FlorianRuen Thanks. I will reproduce the error.
@FlorianRuen I reproduced the error. I observed the main error is Error: ENOENT: no such file or directory
. It looks like some files are missing. Here is list of some files name
DotsHorizontal.tsx
GradientDot.tsx
Read.tsx
Trash.tsx
Avatar.tsx
ErrorIcon.tsx
Info.tsx
Question.tsx
Success.tsx
Up.tsx
Warning.tsx
Chat.tsx
Mail.tsx
Mobile.tsx
Sms.tsx
index.ts
index.ts
When.tsx
i18n.context.tsx
notification-center.context.ts
notifications-provider.context.tsx
notifications.context.ts
novu-provider.context.ts
novu-theme-provider.context.tsx
novu-theme.context.ts
store-provider.context.tsx
store.context.ts
index.ts
styles-provider.tsx
styles-provider.types.ts
date.ts
defaultTheme.ts
index.ts
pagination.ts
react-to-webcomponent.ts
styles.ts
token.ts
@ankur0904 Yes I see the same error, got around 170 warnings.
Two raisons : unused files the refeence need to be removed or used files and you need to find why these files are missing
@FlorianRuen okay
@ankur0904 Just coming back on this subject, do you have any update or still working on it ?
@FlorianRuen Actually, I had my university exam last week so unable to make any progress on this issue. But I will try my best to fix this error and update you within 3-4 days.
The src
folder is present here https://github.com/novuhq/novu/tree/next/packages/notification-center
But it is not present in the node_modules
after running this command
npm install @novu/notification-center
@FlorianRuen Any suggestion on how to fix this issue?
@ankur0904 And what is the content of dist folder ? Because I think the src are the raw sources, and the dist are the compiled one, so maybe this is just a wrong matching or something
@ankur0904
I think the file defaultTheme.ts
match the file in dist/cjs/utils/defaultTheme.js
If it's the case, the path is wrong in defaultTheme.js.map
"sources":["../../../src/utils/defaultTheme.ts"]
What is strange here, we got both js file and TypeScript files for same file It seems to be the same case for many warnings we got on the console (pagination ...)
@FlorianRuen Yes, you are right.
@FlorianRuen What should we do next to fix the error?
Any news?
@tolgig On my side, I didn't get some time to go deeper on how to fix this issue If you have some time, maybe you can check this ?
I seem to be getting this error too, using "@novu/notification-center": "^0.20.0"
Any updates around a fix for this?
Hey folks, did you ever figured out what is the issue here? I can maybe take a look during my free time but I just wanted to understand if there's already some ideas on how to fix it?
@MarcoBomfim Hey, I didn't have time to check deeper this issue, but it seems the problem is due to wrong paths for libraries (check my message https://github.com/novuhq/novu/issues/3400#issuecomment-1697056340)
During compilation, several paths seem broken, which causes libraries not to be found, and therefore this multitude of errors
Hey @FlorianRuen thanks. I did a quick investigation on Friday (with my limited bundling skills), but couldn't pick out what's going on. The mapping seems to be wrong as you said, but I tried several different things and still couldn't get rid of the warning.
One thing caught my attention, I trired running npm pack
and extracting the content of the tarball to see if the sourcemap file exists on the published package
When extracting the file (tar -xzvf novu-notification-center-0.24.1.tgz
) it created a folder called package
with:
dist/
package.json
When first unpacking it, src
was missing from the tarball, so I added it in files
inside package.json
, and generated a new tarball, and I could then see the source.
This apparently didn't help with the warnings though. I'm just adding this here in the hope that someone who knows more about webpack might have a hunch of a fix.
EDIT:
Forgot to mention another curious thing, I noticed two other things:
sourcemap
is disabled on the webpack config for the notifications-center
package. Enabling it seems to make no difference thoughwebpack
? Is there a particular reason for it? I noticed Vue and Angular projects don't have a webpack config filefix it we're facing errors for this
@FrontMizfaTools in the next 2 weeks we are releasing a brand new Inbox component redesigned from the ground up, much smaller bundle size, much more flexibility on styling, and performance improvements. I will post here once we have something.
@FrontMizfaTools in the next 2 weeks we are releasing a brand new Inbox component redesigned from the ground up, much smaller bundle size, much more flexibility on styling, and performance improvements. I will post here once we have something.
Tnx for that. I'm checking this issue everyday. because we need sourcemaps and this is a huge problem for us. If I can help you let me know.
@FrontMizfaTools please take a look at the new component: https://docs.novu.co/inbox/react/get-started
We will be rolling new and updated docs with more details in the next 1-2 weeks
I have installed @novu/react and now I'm facing this error:
TypeError: (0 , _ui.NovuUI) is not a constructor at Renderer.tsx:43:1 at commitHookEffectListMount (react-dom.development.js:23189:1) at commitPassiveMountOnFiber (react-dom.development.js:24965:1) at commitPassiveMountEffects_complete (react-dom.development.js:24930:1) at commitPassiveMountEffects_begin (react-dom.development.js:24917:1) at commitPassiveMountEffects (react-dom.development.js:24905:1) at flushPassiveEffectsImpl (react-dom.development.js:27078:1) at flushPassiveEffects (react-dom.development.js:27023:1) at performSyncWorkOnRoot (react-dom.development.js:26115:1) at flushSyncCallbacks (react-dom.development.js:12042:1) at commitRootImpl (react-dom.development.js:26998:1) at commitRoot (react-dom.development.js:26721:1) at finishConcurrentRender (react-dom.development.js:26020:1) at performConcurrentWorkOnRoot (react-dom.development.js:25848:1) at workLoop (scheduler.development.js:266:1) at flushWork (scheduler.development.js:239:1) at MessagePort.performWorkUntilDeadline (scheduler.development.js:533:1)
hey @FrontMizfaTools! 👋 Could you please share with us more details like whether is it a CRA, Vite, or NextJS app? I would appreciate it if you could follow our guide and the Stackblitz example
hey @FrontMizfaTools! 👋 Could you please share with us more details like whether is it a CRA, Vite, or NextJS app? I would appreciate it if you could follow our guide and the Stackblitz example
Hello. Thanks for response I have been using @novu/notification-center in our project with custom features. right now I am trying to replace it with new @novu/react. I am using react-scripts (CRA) in my project and I guess showing the code will be the best way to talk about it:
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import { Link } from 'react-router-dom';
import { Button, Nav } from 'react-bootstrap';
import { Inbox } from '@novu/react';
// import {
// NovuProvider,
// PopoverNotificationCenter
// } from '@novu/notification-center';
// import { styles } from 'assets/novuStyles';
import { useAppContext } from 'Main';
import { useGetUserInfoQuery } from 'services/authApi';
import ChildrensTooltip from 'components/common/ChildrensTooltip';
const CustomBell = ({ unseenCount }) => {
return (
<ChildrensTooltip
delayToRemove={100}
placement="bottom"
showOnHover={false}
html={'نوتیفیکیشن'}
>
<Nav.Link
as={Button}
variant="link"
className={classNames('px-0', {
'notification-indicator notification-indicator-danger position-relative notification-indicator-fill':
unseenCount !== 0
})}
>
{unseenCount > 0 && (
<span className="notification-indicator-number">{unseenCount}</span>
)}
<FontAwesomeIcon icon="bell" transform="shrink-7" className="fs-4" />
</Nav.Link>
</ChildrensTooltip>
);
};
const NotificationDropdown = () => {
const {
config: { isDark }
} = useAppContext();
const { data: userInfo } = useGetUserInfoQuery();
return (
<>
{userInfo?.path && (
<Inbox
subscriberId={userInfo?.path}
applicationIdentifier={'...'}
backendUrl="...."
socketUrl="...."
// renderBell={unreadCount => <CustomBell unseenCount={unreadCount} />}
/>
)}
{/* <NovuProvider
subscriberId={userInfo?.path}
applicationIdentifier="..."
backendUrl={...}
socketUrl={...}
i18n={{
translations: {
notifications: 'پیام ها',
markAllAsRead: 'خواندن همه',
poweredBy: 'میزفاتولز',
settings: 'تنظیمات',
removeMessage: 'حذف پیام',
markAsRead: 'خواندن پیام',
markAsUnRead: 'نخواندن پیام',
noNewNotification: 'پیام جدیدی جهت مشاهده وجود ندارد'
},
lang: 'fa'
}}
styles={styles(isDark)}
>
<PopoverNotificationCenter
footer={() => <></>}
// theme={{ dark: styles }}
colorScheme={'light'}
>
{({ unseenCount }) => <CustomBell unseenCount={unseenCount} />}
</PopoverNotificationCenter>
</NovuProvider> */}
</>
);
};
export default NotificationDropdown;
Commented code would work If I install notification-center again. but new code with @novu/react. is showing me error.: (0 , _ui.NovuUI) is not a constructor at Renderer.tsx:43:1
my default code would work fine and new one is not.
and in terminal:
Failed to parse source map from '\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js' file: Error: ENOENT: no such file or directory, open 'C:\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js'
Failed to parse source map from 'C:\Users\FrontMizfaTools\Desktop\Projects\app-new\node_modules\@novu\react\dist\client\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js' file: Error: ENOENT: no such file or directory, open 'C:\Users\FrontMizfaTools\Desktop\Projects\app-new\node_modules\@novu\react\dist\client\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js'
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
WARNING in ./node_modules/@novu/react/dist/client/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Compiled with warnings.
Failed to parse source map from '\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js' file: Error: ENOENT: no such file or directory, open 'C:\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js'
Failed to parse source map from 'C:\Users\FrontMizfaTools\Desktop\Projects\app-new\node_modules\@novu\react\dist\client\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js' file: Error: ENOENT: no such file or directory, open 'C:\Users\FrontMizfaTools\Desktop\Projects\app-new\node_modules\@novu\react\dist\client\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js'
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
WARNING in ./node_modules/@novu/react/dist/client/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js' file: Error: ENOENT: no such file or directory, open 'C:\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js'
Failed to parse source map from 'C:\Users\FrontMizfaTools\Desktop\Projects\app-new\node_modules\@novu\react\dist\client\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js' file: Error: ENOENT: no such file or directory, open 'C:\Users\FrontMizfaTools\Desktop\Projects\app-new\node_modules\@novu\react\dist\client\Users\pavlotymchuk\projects\js\novu-2\packages\react\dist\client\index.js'
webpack compiled with 1 warning
@FrontMizfaTools Thank you for providing additional details. We are looking at this.
@FrontMizfaTools hey 👋
We've just published a new version 2.0.0-canary.1
that contains the fix for the CRA app. Please make sure that the node_modules
contains that specific version. Let me know if further help is needed 🙌
@FrontMizfaTools hey 👋 We've just published a new version
2.0.0-canary.1
that contains the fix for the CRA app. Please make sure that thenode_modules
contains that specific version. Let me know if further help is needed 🙌
Frontend errors disappeared and rendered without error. 👍 I just don't know why responds and chats are different while they have same subscriberId, applicationIdentifier, backendUrl and socketUrl. Cause I'm working on frontend panel so I don't know if you had changed the structure or something in backend service or not I should ask my colleagues to check Novu server. So if you think it is for backend service then close the issue and thanks for following issues up. I wish the best for your team ❤️
@FrontMizfaTools are you using a self-hosted version of Novu? In that case we might not released the latest docker images yet
@FrontMizfaTools in the next 2 weeks we are releasing a brand new Inbox component redesigned from the ground up, much smaller bundle size, much more flexibility on styling, and performance improvements. I will post here once we have something.
@scopsy sorry, is this new component you mentioned above fixing the warning messages on the console? Or is this a separate topic?
Yes it is 🙏
e you using a self-hosted version of Novu? In that case we might not released the latest dock
And when can we use self-hosted version?
This has been resolved by the new Inbox component with the updated docker images 🙏
📜 Description
Hi, we use
"@novu/notification-center": "0.14.0"
for our web application and there are many warnings during webpack compile process.👟 Reproduction steps
"@novu/notification-center": "0.14.0"
👍 Expected behavior
There should not be warnings
👎 Actual Behavior with Screenshots
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Contributing Guidelines?
Are you willing to submit PR?
None
NV-2314