While posting the posts i am getting the above error on web consol.
Source map error: request failed with status 404 Resource Resource URL: http://{mywebsite}/js/app.js Source Map URL: bootstrap.js.map
My resourcses/js/app.js looks like this
[const app = new Vue({
el: '#app',
data: {
msg: 'Update new Post:',
content:'',
},
methods:{
addPost(){
axios.post('myid.web/home/addPost', {
content:this.content
})
.then(function(response){
console.log(response);
})
.catch(function(error){
console.log(error);
});
}
}
});][1]
And the webpack.js looks like this
let mix = require('laravel-mix');
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
My partially working output
And my error looks like this
I had this error: Source map error: Error: "request failed with status 404 Resource URL: cdn.jsdelivr.net/npm/less Source Map URL: less. min. js. map" Your method fixed it.
General source map error reporting js mentions a source map, and the source map URL tells us where to find the source map data (in this case, relative to the resource). The error tells us that the source map is not JSON data — so we're serving the wrong file.
I had the same issue and followed Biswas comment. Go to your webpack.mix.js and change
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
to
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.sourceMaps();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With