Laravel 5 Uncaught SyntaxError: Invalid or unexpected token (red dots)

Dennis

I'm new with Laravel and have installed a new project succesfull. My Laravel project is based on composer(https://laravel.com/docs/5.3/installation#installing-laravel)

Now I get some errors while loading some .js files. The error is known by me and i've searched the whole internet to find a solution for me, because I used composer install instead of vagrant installer.

The error:

�HTTP/1.1 200 OK Host: laravel.dev:8000 Connection: close Content-Type: application/javascript Content-Length: 97163

Laravel javascript red dots

As u can see above, there are red dots in a .js files with some header description in it.

I found many solutions, but all of them are about vagrant (homestead) or apache, but I can't find any of that files in my computer. Of course I have found the apache config file and added the EnableSendfile off , but that doesn't work, because my laravel project runs on php artisan serve.

So is there someone who knows the solution for my situation?

Manish

Try to change in ./server.php. May be this will resolve the issue.

if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
   return false;
}

to

if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
ob_end_clean ();
   return false;
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Uncaught SyntaxError: Invalid or unexpected token

Uncaught SyntaxError: Unexpected token =

Uncaught SyntaxError: Unexpected token :

Uncaught SyntaxError: Unexpected token <

Uncaught SyntaxError: Invalid or unexpected token spring boot

jquery Uncaught SyntaxError: Invalid or unexpected token - Input text has an apostrophe

Uncaught SyntaxError: Invalid or unexpected token for new line

JQuery: Uncaught SyntaxError: Invalid or unexpected token

Uncaught SyntaxError: Unexpected token ) on line 5

Uncaught SyntaxError: Invalid or unexpected token @import css

Uncaught SyntaxError: Unexpected token ')'

Uncaught SyntaxError: Unexpected token '&'

Uncaught SyntaxError: Invalid or unexpected token in Html button

Uncaught SyntaxError: Unexpected token 'if'

Uncaught SyntaxError: Unexpected token :

Uncaught SyntaxError: Unexpected token :

Uncaught SyntaxError: Unexpected token <

Uncaught SyntaxError: Unexpected token }

laravel 5.3, php artisan make:auth having Uncaught SyntaxError: Invalid or unexpected token

Uncaught SyntaxError: Invalid or unexpected token even with correct syntax

Uncaught SyntaxError: "Unexpected token { "

uncaught syntaxerror; unexpected token <

Uncaught SyntaxError: Invalid or unexpected token in EXT JS

Uncaught SyntaxError: Unexpected token '<'

ScriptResource.axd Uncaught SyntaxError: Invalid or unexpected token

jquery Uncaught SyntaxError: Invalid or unexpected token - Error

Uncaught SyntaxError: Unexpected token '!'

Firebase: Uncaught SyntaxError: Invalid or unexpected token -> uncaught referenceError

Uncaught SyntaxError: Unexpected token '<'