【问题标题】:laravel 5.3, php artisan make:auth having Uncaught SyntaxError: Invalid or unexpected tokenlaravel 5.3,php artisan make:auth 有 Uncaught SyntaxError: Invalid or unexpected token
【发布时间】:2017-02-21 01:10:54
【问题描述】:

全新安装的 laravel 5.3

执行了以下操作..

  • php artisan make:auth
  • 配置的数据库
  • php 工匠迁移

虽然注销不起作用并出现控制台错误..

Resource interpreted as Stylesheet but transferred with MIME type application/x-gzip: "http://localhost:8000/css/app.css".

app.js:1 Uncaught SyntaxError: Invalid or unexpected token

【问题讨论】:

  • 我从来没有遇到过这个错误,今天早上我做了完全相同的过程。你确定这就是你所做的全部吗?
  • 修复了我之前在 xampp 中启用了 zlib.output_compression=On 的问题。现在注释掉它的工作正常...谢谢!

标签: laravel laravel-5 laravel-5.3


【解决方案1】:

将此添加到您的 .htaccess 文件中:AddType text/css .css - 这将发送正确的标头而不是 x-gzip 的标头。

【讨论】:

  • 问题已修复,我之前在 xampp 中启用了 zlib.output_compression=On。现在注释掉它的工作正常...谢谢!
猜你喜欢
  • 2018-02-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-11-15
  • 1970-01-01
  • 1970-01-01
  • 2012-05-17
  • 2019-02-10
相关资源
最近更新 更多