I am having issue while loading bootstrap 4 in magento 2

var config = {
 paths: {
    'popper': 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.5/umd/popper.min',
    'bootstrap': 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min'
shim: {
    'popper': {
        'deps': ['jquery'],
        'exports': 'Popper'
    'bootstrap': {
        'deps': ['jquery', 'popper']
  • I have create requirejs-config.js as above code.

  • When I load the page it gives me an error

GET http://localhost/project/popper.js net::ERR_ABORTED

Refused to execute script from 'http://localhost/project/popper.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Uncaught Error: Script error for: popper.js http://requirejs.org/docs/errors.html#scripterror at makeError (require.js:166) at HTMLScriptElement.onScriptError (require.js:1681)

  • I face almost same issue, hope any genius will take interest in this and post answers – Manoj Deswal Apr 13 '18 at 7:22
  • Hello I solved the issue, and added bootstrap 4 , using bootstrap.bundle.js – Manoj Deswal Apr 13 '18 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.