0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[laravel 8]The requested resource /フォルダ名 was not found on this server. の解決例

Last updated at Posted at 2022-03-19

何をしたら出た?

LaravelをMVCモデルで使用している中で、javascriptファイルを Laravel Mix を使って表現していました。

ファイル数が増えそうだったので、resources/js/ファイルresources/js/フォルダ/ファイル というディレクトリ構成にしました。

そうしたところ今まで表示できていたページが、タイトルのエラー文を表示する404ページになりました。

解決した方法は?

resources/js/ファイル のディレクトリ構成に直したところ、ページを復活できました。

原因は?

おそらく、Laravel Mix のコンパイルファイルの読み込みは public/js/ 直下のファイルのみ を読み込むロジックとなっているからと思われます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?