sciactive / pnotify

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

Working but Error: Uncaught (in promise): SyntaxError: Unexpected token 'export' #376

Open ruslanguns opened 4 years ago

ruslanguns commented 4 years ago

Everything is working properly but I am getting this error in console using Angular:

ERROR Error: Uncaught (in promise): SyntaxError: Unexpected token 'export'
D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\pnotify\dist\es\PNotify.js:1
let PNotify,posTimer,onDocumentLoaded=()=>{PNotify.defaultStack.context=document.body,window.addEventListener("resize",()=>{posTimer&&clearTimeout(posTimer)
,posTimer=setTimeout(()=>{PNotify.positionAll()},10)})},createStackOverlay=t=>{const e=document.createElement("div");e.classList.add("ui-pnotify-modal-overl
ay"),t.context!==document.body&&(e.style.height=t.context.scrollHeight+"px",e.style.width=t.context.scrollWidth+"px"),e.addEventListener("click",()=>{t.over
layClose&&PNotify.closeStack(t)}),t.overlay=e},insertStackOverlay=t=>{t.overlay.parentNode!==t.context&&(t.overlay=t.context.insertBefore(t.overlay,t.contex
t.firstChild))},removeStackOverlay=t=>{t.overlay.parentNode&&t.overlay.parentNode.removeChild(t.overlay)};const getDefaultArgs=(t,e)=>("object"!=typeof t&&(
t={text:t}),e&&(t.type=e),{target:document.body,data:t});function _styles({styling:t}){return"object"==typeof t?t:PNotify.styling[t]}function _ico

SyntaxError: Unexpected token 'export'
    at Module._compile (internal/modules/cjs/loader.js:895:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.pnotify/dist/es/PNotify (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:2757:18)
    at __webpack_require__ (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:20:30)
    at Object../src/app/shared/services/pnotify.service.ts (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:2404:19)
    at __webpack_require__ (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:20:30)
    at Object../src/app/@auth/auth.service.ts (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:251:12)
    at __webpack_require__ (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:20:30)
    at Object../src/app/shared/sidebar/sidebar.component.ngfactory.js (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:2480:12)
    at __webpack_require__ (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:20:30)
    at Object../src/app/@pages/pages.component.ngfactory.js (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:1406:12)
    at __webpack_require__ (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\dist\server\main.js:20:30)
    at resolvePromise (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:852:31)
    at resolvePromise (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:809:17)
    at D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:913:17
    at ZoneDelegate.invokeTask (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:423:31)
    at Object.onInvokeTask (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\@angular\core\bundles\core.umd.js:26362:37)
    at ZoneDelegate.invokeTask (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:422:60)
    at Zone.runTask (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:195:47)
    at drainMicroTaskQueue (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:601:35)
    at ZoneTask.invokeTask (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:502:21)
    at Server.ZoneTask.invoke (D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\zone.js\dist\zone-node.js:487:48)
    at Server.emit (events.js:210:5)
    at parserOnIncoming (_http_server.js:745:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:115:17) {
  rejection: D:\wamp\www\proyectos\1-proyectos_cash\bikes-showcase\node_modules\pnotify\dist\es\PNotify.js:1
  let PNotify,posTimer,onDocumentLoaded=()=>{PNotify.defaultStack.context=document.body,window.addEventListener("resize",()=>{posTimer&&clearTimeout(posTime
r),posTimer=setTimeout(()=>{PNotify.positionAll()},10)})},createStackOverlay=t=>{const e=document.createElement("div");e.classList.add("ui-pnotify-modal-ove
rlay"),t.context!==document.body&&(e.style.height=t.context.scrollHeight+"px",e.style.width=t.context.scrollWidth+"px"),e.addEventListener("click",()=>{t.ov
erlayClose&&PNotify.closeStack(t)}),t.overlay=e},insertStackOverlay=t=>{t.overlay.parentNode!==t.context&&(t.overlay=t.context.insertBefore(t.overlay,t.cont
ext.firstChild))},removeStackOverlay=t=>{t.overlay.parentNode&&t.overlay.parentNode.removeChild(t.overlay)};const getDefaultArgs=(t,e)=>("object"!=typeof t&
&(t={text:t}),e&&(t.type=e),{target:document.body,data:t});function _styles({styling:t}){return"object"==typeof t?t:PNotify.styling[t]}function _ico

Thanks in advance!