sciactive / pnotify

Beautiful JavaScript notifications with Web Notifications support.
https://sciactive.com/pnotify/
Apache License 2.0
3.65k stars 513 forks source link

I have message "Cannot read property 'prototype' of undefined" after bower install #267

Closed youngcademy closed 7 years ago

youngcademy commented 7 years ago

Chrome console show the massage above

pnotify.animate.js:1 Uncaught TypeError: Cannot read property 'prototype' of undefined(anonymous function) @ pnotify.animate.js:1(anonymous function) @ pnotify.animate.js:1(anonymous function) @ pnotify.animate.js:1
pnotify.buttons.js:1 Uncaught TypeError: Cannot read property 'prototype' of undefined(anonymous function) @ pnotify.buttons.js:1(anonymous function) @ pnotify.buttons.js:1(anonymous function) @ pnotify.buttons.js:1
pnotify.callbacks.js:1 Uncaught TypeError: Cannot read property 'prototype' of undefined(anonymous function) @ pnotify.callbacks.js:1c @ pnotify.callbacks.js:1(anonymous function) @ pnotify.callbacks.js:1
pnotify.confirm.js:1 Uncaught TypeError: Cannot read property 'prototype' of undefined

after bower install.

I am trying to resolve, but don't know why do comes up this error. how do I.

it is above bower.json

"dependencies": {
    "font-awesome": "4.4.0",
    "jquery": "1.11.3",
    "jquery-ui": "^1.11.4",
    "bootstrap": "3.3.6",
    "angular": "^1.5.7",
    "angular-bootstrap": "1.3.3",
    "angular-animate": "^1.4.0",
    "angular-cookies": "^1.4.0",
    "angular-messages": "^1.4.0",
    "angular-resource": "^1.4.0",
    "angular-ui-router": "0.2.15",
    "angular-sanitize": "^1.4.0",
    "angular-touch": "^1.4.0",
    "oclazyload": "foothold-oclazyload#1.0.6",
    "angular-local-storage": "^0.5.2",
    "angular-nicescroll": "^0.0.9",
    "jquery-validation": "^1.15.1",
    "pnotify": "^3.0.0",
    "sweetalert": "^1.1.3"
  }
VincentSim commented 7 years ago

I have the same error. Have you found a solution ?

youngcademy commented 7 years ago

"dist/pnotify.js" go up top. you should edit bower.json to above.

"pnotify": {
      "main": [
        "dist/pnotify.js",
        "dist/pnotify.css",
        "dist/pnotify.buttons.css",
        "dist/pnotify.buttons.js"
      ]
    }
hperrin commented 7 years ago

This was due to a bad ordering in the bower.json file. It should be fixed when 3.0.2 is released, in the next couple days.