2
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 ログイン機能実装

Posted at

#laravel6系での環境構築からログイン機能実装でつまずいた所

参考にさせていただいた記事

Laradockでの環境構築
https://qiita.com/mukae_tech/items/24709085948a6d707da3

##Laravel 6 の場合
まずは結果から

$ composer require laravel/ui:1.2.0

もしここで composer require laravel/ui でバージョン指定しないと6系の場合は7系にしろと怒られます。

#####エラー内容

 - Conclusion: don't install laravel/framework v6.18.11
    - laravel/ui 2.x-dev requires illuminate/filesystem ^7.0 -> satisfiable by illuminate/filesystem[7.x-dev, v7.0.0, v7.0.1, v7.0.2, v7.0.3, v7.0.4, v7.0.5, v7.0.6, v7.0.7, v7.0.8, v7.1.0, v7.1.1, v7.1.2, v7.1.3, v7.2.0, v7.2.1, v7.2.2, v7.3.0, v7.4.0, v7.5.0, v7.5.1, v7.5.2, v7.6.0, v7.6.1, v7.6.2, v7.7.0, v7.7.1, v7.8.0, v7.8.1, v7.9.0, v7.9.1, v7.9.2].

必要であればcomposer update

やっとこれでlaravel/uiが使えます。

$ php artisan ui vue --auth
$ npm install
$ npm run dev

またここで怒られてますね。
#####エラー内容

Module build failed (from ./node_modules/css-loader/index.js): ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.

sass-loaderの6系でのバージョンの問題である可能性があるので対策としては

$ npm uninstall --save-dev sass-loader
$ npm install --save-dev sass-loader@7.1.0

もう一度

$ npm run dev
 DONE  Compiled successfully in 10764ms                                                                                                                                                                                             4:37:32 AM

       Asset     Size   Chunks             Chunk Names
/css/app.css  177 KiB  /js/app  [emitted]  /js/app
  /js/app.js  1.4 MiB  /js/app  [emitted]  /js/app

おわり

2
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
2
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?