Laravel/horizon 缺少 CSS/JS 构建。

huangapple go评论63阅读模式
英文:

Laravel/horizon missing css/js build

问题

/horizon 路由来自 laravel/horizon 包能够正常工作,但是 CSS 和 JavaScript 没有被加载。

这是 /horizon 路由的样子:

Laravel/horizon 缺少 CSS/JS 构建。

然而,我只是安装了这个包并且按照 Laravel 文档的安装步骤进行了操作:

  • composer require laravel/horizon
  • php artisan horizon:install
  • php artisan optimize
  • npm run dev(我也尝试了 npm run build,...)

这是我的配置:

  • laravel-mix 4.0.7
  • laravel/horizon 5.14
  • laravel 8.0

你能帮我吗?

英文:

The /horizon route from the laravel/horizon package works, but the css and javascript are not loaded.

this is what the road /horizon looks like:

Laravel/horizon 缺少 CSS/JS 构建。

However, I just installed the package and followed the laravel documentation installation

  • composer require laravel/horizon
  • php artisan horizon:install
  • php artisan optimize
  • npm run dev ( and I tried npm run build,...)

this is my config :

  • laravel-mix 4.0.7
  • laravel/horizon 5.14
  • laravel 8.0

Can you help me ?

答案1

得分: 1

确保资产已包含在您的应用程序中。尝试运行以下命令。

php artisan vendor:publish --tag=horizon-assets && npm run dev
英文:

Make sure assets are included in your application. Try running the following command.

php artisan vendor:publish --tag=horizon-assets && npm run dev

答案2

得分: 0

已解决的变量环境:

ASSET_URL=/.

英文:

Resolved with variable environment :

ASSET_URL=/.

huangapple
  • 本文由 发表于 2023年2月14日 20:39:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/75447973.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定