未捕获的语法错误:意外的令牌导出 - popper.js 错误 [英] Uncaught SyntaxError: Unexpected token export - popper.js error
本文介绍了未捕获的语法错误:意外的令牌导出 - popper.js 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Angular 给出了错误: bootstrap 4 中的 popper.js 给出了 SyntaxError Unexpected token export
我从浏览器控制台收到此错误.
I'm getting this error from browser console.
即使我更改了 popper.min.js 位置引用但没有用..
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/umd/popper.min.js
node_modules/popper.js/dist/ems/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"
]
推荐答案
Bootstrap.min.js 依赖于 popper.min.js ,更改顺序如下,
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",
]
这篇关于未捕获的语法错误:意外的令牌导出 - popper.js 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文