Skip to content
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

PNotify 4, NPM & webpack #371

Open
C0kkie opened this issue Nov 23, 2019 · 1 comment
Open

PNotify 4, NPM & webpack #371

C0kkie opened this issue Nov 23, 2019 · 1 comment

Comments

@C0kkie
Copy link

C0kkie commented Nov 23, 2019

Hello,

i installed pnotify via

npm install --save pnotify
npm install --save material-design-icons
npm install --save nonblockjs

and added

window.PNotify = require("pnotify/dist/iife/PNotify");

to the app.js

if i build the things now with webpack and i use

PNotify.error({
title: 'Fehler',
text: "test",
styling: 'bootstrap3'
});

i get the error

Uncaught TypeError: PNotify.error is not a function

@M-BenAli
Copy link

M-BenAli commented Jun 5, 2020

I had the same issue and resolved it by importing PNotify from the umd folder instead of the iife folder.
Add this require statement:
window.PNotify = require('pnotify/dist/umd/PNotify')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants