Are you requiring thebootstrap.js into your app.js? Also, that error appears like you are using axios directly in a script tag on your blade view - are you perhaps trying to use axios before the app.js is loaded on the page; check the order of your scripts?
Mar 17, 2019
6
Level 9
create:925 Uncaught ReferenceError: axios is not defined
I updated my Laravel app from 5.5 to 5.6 to 5.7 but axios stops working I've deleted node_modules dir, npm install, npm axios install, etc. but still got the error!
"devDependencies": {
"axios": "^0.18.0",
"bootstrap-sass": "^3.4.1",
"cross-env": "^5.2.0",
"jquery": "^3.3.1",
"laravel-mix": "4.0.15",
"lodash": "^4.17.11",
"resolve-url-loader": "2.3.1",
"sass": "^1.17.3",
"sass-loader": "7.*",
"vue": "^2.6.9",
"vue-template-compiler": "^2.6.9"
},
My bootstrap file is ok, like:
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
So, what could be wrong?
P.S.: When I run npm outdated, nothing appears.
Please or to participate in this conversation.