Uncaught SyntaxError: Unexpected token export - popper.js error

旧时模样 提交于 2019-12-20 03:59:06

问题


Angular is giving the error: popper.js in bootstrap 4 gives SyntaxError Unexpected token export

I'm getting this error from browser console.

Even I changed the popper.min.js location reference but no use..

node_modules/popper.js/dist/umd/popper.min.js

node_modules/popper.js/dist/ems/popper.min.js

Angular.json

    "scripts": [
      "node_modules/bootstrap/dist/js/bootstrap.min.js",
      "node_modules/jquery/dist/jquery.slim.min.js",
      "node_modules/popper.js/dist/popper.min.js"
    ]

回答1:


Bootstrap.min.js is depend on the popper.min.js , change the order as follows,

   "scripts": [
     "node_modules/jquery/dist/jquery.slim.min.js",
     "node_modules/popper.js/dist/popper.min.js",
      "node_modules/bootstrap/dist/js/bootstrap.min.js",
   ]


来源:https://stackoverflow.com/questions/53028427/uncaught-syntaxerror-unexpected-token-export-popper-js-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!