-
Next.js
useSearchParams() should be wrapped in a suspense boundary
Next.js14でuseSearchParams()を使うと以下のようなエラーが出ました。 ✓ Linting and checking validity of types ✓ Collecting page data Generating static pages (0/12) [ ] ⨯ useSearchParams() should be wrapped in a suspense boundary at page &q... -
コード
react-papaparseでshift-jisのCSVを読み込む
react-papaparseでshift-jisのCSVを読み込むと次のように日本語が文字化けしてしまします。 '�˗��ԍ�', '�⍇���ԍ�', '���Ǝ�ID', '�T� '10000000000000053035', '', '10028', '0001', '3826... -
コード
dom-to-imageで画像の大きさと質を設定する
dom-to-imageを使ってdomを画像にすると、出力される画像は大きさがそのままの大きさの画像が出力されます。 そのため、出力された画像の用途によっては 画像が小さい 画像が荒い と感じるので、画像の大きさと質の設定方法を紹介します。 【画像の大きさ... -
AWS
BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE
aws CodePipelineを使って、コードをビルドする際に「BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE」のエラーに遭遇したので解決方法を紹介します。 【原因: CodeBuildからリポジトリへのアクセス権限がない】 「BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE」となって... -
AWS
ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve secrets from ssm: service call has been retried 1 time
terraformを使ってecsでサービスを作ろうとしたのですが、「ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve secrets from ssm: service call has been retried 1 time... -
AWS
terraformのvpc = trueでuse domain attribute insteadのwarning
terraformでAWS VPCを作るときに、構文内にvpc = trueを使用したら、warningが出たので解決方法をまとめます。 【問題】 AWS VPCを作りたかったので、natをこのように定義。 resource "aws_eip" "nat_1a" { vpc = true tags = { Name ... -
コード
prismaのcreateManyでは200レコードまでしか登録できない
prismaのcreateManyを使って約1000件のデータを保存したかったのですが、データベースには200件までしか登録されませんでした。 【問題】 prismaのcreateManyに1000件のデータを突っ込んで保存。 const data = await fetch(url); const items: itemType[] ... -
コード
tfenvをインストールしてterraformを使えるようにする
【tfenvをインストール(mac)】 terraformはバージョンが頻繁に更新されるので、tfenvを使ってバージョン管理をします。 brewを使ってtfenv をインストール。 $ brew install tfenv tfenvは3をインストールしました。 $ tfenv -v tfenv 3.0.0 次に現在使... -
AWS
Error: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.
【はじめに】 初めてterraformを使用したときに、「Error: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.」というエラーがでました。 その解決方法をまとめます。 【問題】 terraform applyをすると次の... -
Next.js
Parsing error: DeprecationError: ‘originalKeywordKind’ has been deprecated since v5.0.0 and can no longer be used. Use ‘identifierToKeywordKind(identifier)’ instead.
Next.js13のtypescriptのバージョンをアップグレードしたら、 Parsing error: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instea...