No visible cause for “Unexpected token ILLEGAL”

后端 未结 11 2426
轻奢々
轻奢々 2020-11-22 00:09

I\'m getting this JavaScript error on my console:

Uncaught SyntaxError: Unexpected token ILLEGAL

This is my code:

11条回答
  •  借酒劲吻你
    2020-11-22 01:06

    why you looking for this problem into your code? Even, if it's copypasted.

    If you can see, what exactly happening after save file in synced folder - you will see something like ***** at the end of file. It's not related to your code at all.

    Solution.

    If you are using nginx in vagrant box - add to server config:

    sendfile off;
    

    If you are using apache in vagrant box - add to server config:

    EnableSendfile Off;
    

    Source of problem: VirtualBox Bug

提交回复
热议问题