pnotify
pnotify copied to clipboard
pnotify v5.1.0 and angular 9
Hi,
I use latest version of pnotify in my ng9 app but I'm facing of some issues I don't understand.
1 - I have error in in node_modules/@pnotify/core/Stack.d.ts line 1
TS wants import { Notice } from './'; instead of import Notice from './';
Stack.d.ts img

TS error img

2 - On notification, it displays on bottom left of my screen with no icons, no click button etc.. instead of top right of my screen
Notification img

Code img

Thanks for help
i have the same error .... in my app ... but:
I've changed index.d.ts, at line 232, From : export abstract class Notice extends NoticeProperties To : export default abstract class Notice extends NoticeProperties
and the error go away .... i think that, we have two abstract classes declared in this file, however, angular doesn't know what class is the "main" class of the file.
i think that it's the answer! See ya
Hi, Thanks for reply (I go to modify in node_modules) but what the developer think about these issues ? Do they will be fixed in the next version to fit with angular 9 ?
Hi,
I made change in the core/index.d.ts but I have the same issue. The notification display but no icon, no button and always in bottom left.
Thanks
so, i've tested yesterday, and i got the same problem ... with pnotify, so, now, i saw that the developer has made some changes ... i'll try it again ...
see ya
Hi,
I made change in the
core/index.d.tsbut I have the same issue. The notification display but no icon, no button and always in bottom left.Thanks
Bro .... the error continues .... let wait other commit from developer ....
tks
Hi,
Thanks for your assistance. I wait for the developer.
see ya
Looks like both of these PRs fix this issue in differing ways: #399 #398
@hperrin if you get a moment, would you mind taking a look at them please? 🙌
Managed to recreate this on codesandbox.io with Angular 11.2 which is interesting because no errors are thrown there, which is why I think this was overlooked
Easy way recreate this issue:
ng new PNotifyTestnpm i --save pnotify- (Add code either from the PNotify Angular docs or from the provided codesandbox.io example)
ng s
I'm looking into this now.
Is this only happening with Angular, or with any project using TypeScript?
Is this only happening with Angular, or with any project using TypeScript?
Can't say for sure, I think everyone who commented here experienced it with Angular projects - I suspect Typescript projects may be affected too
Since Svelte now supports TypeScript natively, I may be able to do away with the type definition file and convert PNotify to typed Svelte.
Hey @hperrin - just wanted to follow up on this? :)