I have been tweaking in Gatsby and by far it provides seamless functionality for static websites. I have stack where I need to design layouts using bootstrap as far as layouts are concerned bootstrap works well but for additional support like dropdowns carousel or modal I have to use bootstrap.js and it's dependencies though in local environment everything works fine but when I am deploying my website our netlify I am facing this issue
4:25:02 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
4:25:01 PM: 7 | //# sourceMappingURL=bootstrap.min.js.map
4:25:01 PM:
4:25:01 PM: WebpackError: TypeError: Cannot set property 'emulateTransitionEnd' of undefin ed
4:25:01 PM:
4:25:01 PM: - bootstrap.min.js:6
4:25:01 PM: [lib]/[bootstrap]/dist/js/bootstrap.min.js:6:2564
4:25:01 PM:
4:25:01 PM: - bootstrap.min.js:6 ./node_modules/bootstrap/dist/js/bootstrap.min.js
4:25:02 PM: Shutting down logging, 58 messages pending
After further digging over this issue in official repo and over google most people are recommending react-bootstrap or reactstrap but I am very much bound to bootstrapjs and unable to find out the proper fix for the above error is there anyway or best way to include bootstrap js? Here is my package.json file.
"dependencies": {
"bootstrap": "^4.3.1",
"gatsby": "^2.8.2",
"gatsby-image": "^2.1.2",
"gatsby-plugin-manifest": "^2.1.1",
"gatsby-plugin-offline": "^2.1.1",
"gatsby-plugin-react-helmet": "^3.0.12",
"gatsby-plugin-react-svg": "^2.1.1",
"gatsby-plugin-sass": "^2.0.11",
"gatsby-plugin-sharp": "^2.1.3",
"gatsby-source-filesystem": "^2.0.38",
"gatsby-transformer-sharp": "^2.1.21",
"jquery": "^3.4.1",
"node-sass": "^4.12.0",
"popper.js": "^1.15.0",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-helmet": "^5.2.1"
},
"devDependencies": {
"prettier": "^1.17.1"
},
Thank you in advance!
./node_modules/bootstrap/dist/js/bootstrap.min.js
exist in your project? – Lepus