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"
]
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"
]
Share
Improve this question
asked Oct 28, 2018 at 4:45
RajathRajath
2,98810 gold badges30 silver badges46 bronze badges
1
- when I used to "node_modules/popper.js/dist/umd/popper.min.js" umd location it is giving this error- Uncaught TypeError: Cannot read property 'fn' of undefined. For other reference it is working well esm and dist. – Rajath Commented Oct 28, 2018 at 4:51
1 Answer
Reset to default 5Bootstrap.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",
]