docker-compse up で failed to bind port 0.0.0.0:80/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use
![Thumbnail of post image 051](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/FSE_TechPod_Artwork_800x800.png?resize=150%2C150&ssl=1)
知らないうちに nginx 起動してた…🤔
詳細VPS で apt upgrade したらカーネルが
ポートの状態確認するsudo lsof -i :80なんか使われてた…
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEnginx 692 root 6u IPv4 16188 0t0 TCP *:htt ...
Github Actions で VPS に Deploy しようとしたら Host key verification failed. で ssh 接続に失敗
![Thumbnail of post image 120](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/FSE_TechPod_Artwork_800x800.png?resize=150%2C150&ssl=1)
known_host の指定間違えてた…。
shimataro/ssh-key-action 使用時に known_host の指定が必須になっていて、 – – で Repository secrets を追加するのだけれど、VPS上の ~/.ssh/known_hosts ファイルの中身をペーストしてたのでした…。
接続する先が V ...
mecab-ipadic-neologd で Hash value of /var/www/moyosy/mecab-ipadic-neologd/libexec/../build/mecab-ipadic-2.7.0-20070801.tar.gz don’t match のエラーが出てインストールできない
![Thumbnail of post image 151](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/FSE_TechPod_Artwork_800x800.png?resize=150%2C150&ssl=1)
(環境によって異なるかもですが)インストール用 shell script 内での、ダウンロードした tar.gz ファイルのハッシュ値比較で上手くいかず、強制的にインストールが止まってしまう状態。
生成したハッシュ値の最後に半角スペースがあり、これが原因でハッシュ値比較の結果が false になっていた。
Dockerfile 内で
RUN sed -i ' ...[Laravel][Redis] Call to undefined method Illuminate\Cache\ArrayStore::getRedis() とかいうエラーが出る
![Laravel Logo](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/laravel-l-slant.png?resize=150%2C150&ssl=1)
テスト実行中でした。
そして、 env.testing での `CACHE_DRIVER` 設定は file になっていた、というオチ。
「こないだまで普通に実行できてたはずなのに!」
って焦りながら悩んでて、気づくのにしばらくかかりましたよ… (-_-;)
[Laravel][PHPUnit] メール送信のテスト時に ErrorException: Undefined variable: message (View: */resources/views/emails/*.blade.php) が出る
![Thumbnail of post image 045](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/FSE_TechPod_Artwork_800x800.png?resize=150%2C150&ssl=1)
たぶん、メールの文面用に用意した blade 内で、 $message->embed(‘public/images/logo.png’) とか書かれてると思います。
メールのレンダリングを実行する前に、
$mail->viewData = new Message(new Swift_Message());を実行してやることで、 ...
[Go][Echo] Logging to file.
![Thumbnail of post image 102](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/FSE_TechPod_Artwork_800x800.png?resize=150%2C150&ssl=1)
In Echo’s official document, describes about logging to stdout.
“Customization | Echo – High performance, minimalist Go web framework”
I want to write logs to fi ...
[Laravel] Testでデータ削除してるのに assertDatabaseMissing が Failed になる
![Thumbnail of post image 158](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/FSE_TechPod_Artwork_800x800.png?resize=150%2C150&ssl=1)
削除しようとしているそのモデル、SoftDelete 設定になってません?
assertDatabaseMissing ではなく assertSoftDeleted 使ってね。
詳細テストコードをたくさん書いていくぜー!
って張り切ったものの、めっちゃ足止め食らいました…。
リモートデバッグで1行ずつ動かしても、
App\Models ...[Laravel] Test (PHPUnit) 実行時に InvalidArgumentException: Unable to locate factory with name [default] のエラーが出る
![Thumbnail of post image 027](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/FSE_TechPod_Artwork_800x800.png?resize=150%2C150&ssl=1)
setUp() 内で parent::setUp() 呼ぶの忘れてない?(公式にも「テストクラスに独自のsetUpメソッドを定義する場合は、親のクラスのparent::setUp()/parent::tearDown()を ...
[Node] WSL2 にNode環境を構築(nvm使うべし)
![Thumbnail of post image 126](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/640px-Node.js_logo.svg_.png?resize=150%2C150&ssl=1)
最初から nvm 使うべし。
詳細$ sudo apt install nodejsで環境作ってたんだけれど、firebase CLI 入れようとして
$ npm install -g firebase-toolsってやったら
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib ...[Laravel] root 外のファイルにアクセスしたら laravel Path is outside of the defined root と怒られたのでどうにかしたい
![Laravel Logo](https://i0.wp.com/techfree.jp/wp/wp-content/uploads/laravel-l-slant.png?resize=150%2C150&ssl=1)
config/filesystems.php に、自前で設定を追加すればOK。
詳細Laravel のデフォルト設定だと、
'local' => ,となっておりまして、 プロジェクトルート/storage/app が起点になってました。
例えば、/storage/temp にある全ファイルを取得したい、という場合に、
$tempfiles ...