2023-07-01から1ヶ月間の記事一覧

cap deployでNoMethodError: undefined method `match' for nil:NilClass

エラー $ bundle exec cap production deploy (Backtrace restricted to imported tasks) cap aborted! NoMethodError: undefined method `match' for nil:NilClass 対応 bundle exec cap production deploy SERVER_IP=IPアドレス で一旦動作することを確認…

NotImplementedError: OpenSSH keys only supported if ED25519 is available net-ssh requires the following gems for ed25519 support:

対応 以下を追加してbundle installで解決 group :development do # 〜略〜 gem 'ed25519' gem 'bcrypt_pbkdf' end エラー $ bundle exec cap production deploy SERVER_IP=IPアドレス #<Thread:0x00007fe0069f1bc0@/Users/username/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.21.4/lib/sshkit/runners/parallel.rb:10 run> termin…</thread:0x00007fe0069f1bc0@/users/username/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.21.4/lib/sshkit/runners/parallel.rb:10>

TypeError: Cannot set properties of undefined (setting 'reactRoot')

概要 Reactをv17→v18で変えた時に発生。 対応するようにNext.jsをv12→v13で変更し改善。 感想 この辺の対応は個人でプロトタイプを色々いじっている方が、 現場でコードをいじっているより気づいて試しやすそう。

Error: Hydration failed because the initial UI does not match what was rendered on the server. Warning: Expected server HTML to contain a matching <div> in <p>. See more info here: https://nextjs.org/docs/messages/react-hydration-error

概要 Next.jsのv13へバージョンアップ時、pタグでdivタグをネスとしていたことが原因で発生。pタグをdivタグに変更して改善。 エラーメッセージ Error: Hydration failed because the initial UI does not match what was rendered on the server. Warning: …

プロパティ 'toBeChecked' は型 'Matchers<void, HTMLElement>' に存在しません

import '@testing-library/jest-dom'を書いて、 yarn add -D @testing-library/jest-dom yarn add -D @types/testing-library__jest-dom で解決 qiita.com

'React' は UMD グローバルを参照していますが、現在のファイルはモジュールです。代わりにインポートを追加することを考慮してください。

import React from 'react'を書けばOK

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment.

jest.config.jsでtestEnvironment: 'jsdom',にして、 yarn add -D jest-environment-jsdomすれば良い。

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

エラーメッセージ $ yarn jest yarn run v1.22.19 $ /Users/username/Desktop/products/next-various/node_modules/.bin/jest ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated. Please do transform: { <transform_regex>: ['ts-</transform_regex>…

Cannot find module 'react-dom/client' from 'node_modules/@testing-library/react/dist/pure.js'

react, react-domとjestのバージョンが合っていないことが原因 zenn.dev

iOSデバイス上のWebアプリにおけるズーム動作の制御方法

iOSデバイス上でのWebアプリのズーム動作は、多くの場合、ユーザーのアクセシビリティを向上させるための機能です。ただし、デザインや機能の観点からこの動作を制御したい場合は、以下のようなCSSのプロパティを利用することで、ズームやピンチズームの動作…