Chrome控制台显示上面的按摩
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
安装凉亭后。
我想解决,但不知道为什么。
我该怎么做。
它高于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"
}
答案 0 :(得分:1)
似乎bower.json
包is not loading the main .js file properly的pnotify
。
一种可能的解决方案是转到主目录中{b}正在安装包的bower_components/pnotify
文件夹,然后修改bower.json
以确保"dist/pnotify.js"
是第一行:
{
"name": "pnotify",
"description": "JavaScript notification plugin.",
"main": [
"dist/pnotify.js",
"dist/pnotify.animate.js",
"dist/pnotify.brighttheme.css",
"dist/pnotify.buttons.css",
"dist/pnotify.buttons.js",
"dist/pnotify.callbacks.js",
"dist/pnotify.confirm.js",
"dist/pnotify.css",
"dist/pnotify.desktop.js",
"dist/pnotify.history.css",
"dist/pnotify.history.js",
"dist/pnotify.mobile.css",
"dist/pnotify.mobile.js",
"dist/pnotify.nonblock.js"
],
"ignore": [
"build-tools/",
"includes/",
"devnote*.*",
"index.html",
"testing.html",
"buildcustom.php",
"package.json",
"src/"
],
"license": [
"Apache-2.0"
],
"dependencies": {
"jquery": ">=1.6"
}
}
答案 1 :(得分:0)
我遇到了同样的错误。
我在主要的Pnotify文件pnotify.js之后包含了pnotify.custom.min.js。