Loading failed for the <script> with source “http://localhost:8000/lib/js/jquery.emojiarea.js”

Viewed 11162

This message appears in my console:

Loading failed for the <script> with source “http://localhost:8000/lib/js/config.js”.

The message appears after adding this in head:

<head>
  <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="lib/css/emoji.css" rel="stylesheet">
  <script src="lib/js/config.js"></script>
  <script src="lib/js/util.js"></script>
  <script src="lib/js/jquery.emojiarea.js"></script>
  <script src="lib/js/emoji-picker.js"></script>

Knowing that I make chat system in laravel with vue and socket and I will add emoji in input (send message).

I added this in vue.js to make emoji picker:

<input data-emojiable="true" v-model="message" @keyup.enter="sendMessage" 
       id="btn-input" type="text" class="form-control input-sm" 
       placeholder="Type your message here..." />
2 Answers

You could elaborate a little in that question, that would help, from my experience (it has happened to my a couple of times), it could be that the web navigator that you are using have a add blocker installed, if correct, try to disable it and try again.

If it don't work, try using another web navigator, i got a similar problem but only in Firefox(it wouldn't fix the problem but at least would narrow it a little).

If you still get the problem you can try to access that URL to see if the link is really that one.

As a bonus try using the helper instead of the hard-coded link,

<script src="{{asset('lib/js/config.js')}}"></script>

For me, following meta tag in header caused the problem:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

I removed the above meta tag and it worked fine.

Related