sandbox-memo

開発してて出たエラーをメモる場所

cloud storageへfile.saveをしようとしたらTypeError: RequestInit: duplex option is required when sending a body.

こんな感じのコードでfirebase adminをつかってバイナリファイルをcloud storageへアップロードしようとした。 const bucket = admin .storage() .bucket("hogehoge"); const bufferedContent = Buffer.from(base64EncodedContent, "base64"); const filePat…

postmarkのinbound rules apiでハマったのでメモ

Inbound rules triggers API | Postmark Developer Documentation postmarkのinbound rules api(受信拒否アドレス、ドメインを設定するapi)にpostでルール追加しようとしたら、エラーになった。 ErrorCodeは101らしいが、公式のエラーコードのドキュメント…

postmarkのservers apiが422エラーになってハマったのでメモ

sendgridが大嫌いなのでメール配信サービスはpostmarkを使っている。 postmarkで新規サーバーを作成する処理をつくったら、謎にエラーになったのでメモ。 Servers API | Postmark Developer Documentation このAPIに対してPOSTでリクエストしたらエラーにな…

firebase emulators:export ./をしたら全てがrmされた

まじで意味がわからないんだけどとりあえずemulatorのファイルを出力してみようと雑に firebase emulators:export ./ をしたら、全てのファイルがrmされた。 export先のディレクトリをまずrmdir -fするらしい。 remoteにpushしてなかった10時間分の作業内容…

cloud functionsで参照型の値を含むobjectを扱おうとしたらUncaught RangeError: Maximum call stack size exceeded

cloud functions経由でfirestoreからデータ取得する処理がなんかInternal errorになったのでメモ。 { name: "hogehoge", email: "aaaa@example.com" } こんな感じのuserDoc的を返す処理で昨日までは普通に動いてたんだけど、 { name: "hogehoge", email: "aa…

react18でreact-jsonschema-formつかったらconsoleにwarning出っぱなし

Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. コンソールにこういうwarningが出てる。 react16.9から…

CloudBuildで”no concurrent builds quota available to create builds”エラー

GitHubにプッシュ→CloudBuild→CloudRunへデプロイという感じで動いていたプロジェクトで、CloudBuildが急にエラーというか失敗するようになった。 ログを見ると、 ビルドを実行できませんでした: generic::failed_precondition: generic::failed_preconditio…

nextjsのプロジェクトをcloudrunに載せるためにdocker化したら謎のエラーが出たのでメモ

github.com nextjs公式のこちらを参考に、nextjsにdocker用のファイルなり設定を追加して、docker build -t nextjs-docker .からのdocker run -p 3000:3000 nextjs-dockerをした。 で、localhost:3000にアクセスすると、真っ白で、ターミナルに以下のエラー…

npm installでこうなった

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. gyp: No Xcode or CLT version detected! github…

vueセットアップでエラー出た

ec2-user:~/environment/todo $ npm run dev したら todo@1.0.0 dev /home/ec2-user/environment/todo webpack-dev-server --inline --progress --config build/webpack.dev.conf.js sh: webpack-dev-server: command not found npm ERR! file sh npm ERR! c…

railsでコマンド叩いたらsqlite3のgemがなんたらというエラーが出た

$ rails generate controller home top と叩いたら /home/ec2-user/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem…

rails new blogしたらエラーでた

Getting Started with Rails — Ruby on Rails Guides rails new blog したら以下のようなエラーがでた。 An error occurred while installing sqlite3 (1.3.13), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.13' --source 'h…

rake db:createしようとしたらエラーが出た②

sandbox-memo.hatenablog.com のあと、rake db:create:all をしてみたら別のエラーが出るようになった。 ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. という…

rake db:createしようとしたらエラーが出た②

sandbox-memo.hatenablog.com のあと、rake db:create:all をしてみたら別のエラーが出るようになった。 ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. という…

rake db:createしようとしたらエラーが出た①

qiita.com のデータベースの作成のとこでつまずき。 rake db:create:all したらエラーが出て You have already activated rake 12.3.0, but your Gemfile requires rake 12.3.1. Prependingbundle execto your command may solve this. と言われてしまった。…

vagrant synced_folderをnfsモードにしようとしたらエラー出た

qiita.com を見ながら環境構築してたらエラーでたのでメモ。 config.vm.synced_folder ".", "/vagrant", type: "nfs" vagrant reload したら NFS requires a host-only network to be created. Please add a host-only network to the machine (with either …

sinatraつかってみようと思ったらエラー出た

qiita.com の記事を参考にsinatraのインストールからハロワまでやってみようとしたらエラーが出た。 #myapp.rb require 'sinatra' require 'sinatra/reloader' get '/' do "Hello world " end ってのつくって、ruby myapp.rb したら /Library/Ruby/Site/2.3.…

Keystone JSをCloud9で試すメモ

Wordpress以外のいいかんじのCMSないかなーとおもっていたらKeystone JSというのがよさげだったので試してみたメモ。 環境はCloud9でござる。 参照したページ セットアップは超簡単。 KeystoneJSとYEOMANとmongoDBの各公式ページをみて、書いてあることを実…

macでzcatコマンド叩いたらエラーになった

zcat hoge.sql.gz | mysql -h 127.0.0.1 -u root -p hoge_local といういつものコマンドでgzipをDBにインポートしようとしたら、 zcat: can't stat: hogesql.gz (hoge.sql.gz.Z): No such file or directory というエラーになった。 いや、No such file or d…

PWAに対応してるサービスまとめ

スマホの空き容量がない民の自分には、PWAがめっちゃ便利。 日本向けのサービスでPWA対応してるやつメモ。 MAP https://www.google.co.jp/maps/ ESTATE https://suumo.jp/ SNS https://twitter.com/ https://www.tumblr.com/ TRAVEL https://www.wegotravel.…

undefined method `strftime' for nil:NilClassといわれた

herokuにスケジュールアプリを載せるべく、時刻を表示しようとしたら なぞのエラーになってしまった。 heroku logs -t してみたら ActionView::Template::Error (undefined method 'strftime' for nil:NilClass): だそうな。 要素がnilなものに対してstrftim…

BitBucketのPipelineのBuildが失敗した

Warning: the running version of Bundler (1.14.6) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. Your Ruby version is 2.4.0, but your G…

herokuつかおうとおもったらgem install pgが失敗した

挫折した人必見!HerokuでRailsアプリを公開する方法 | 侍エンジニア塾ブログ | プログラミング入門者向け学習情報サイト このサイトを見ながらherokuにデプロイしようと思ってたら、gem install pgでつまづいた。 いろいろググって他の人の試行錯誤結果を試…

ActiveRecordでTypeというカラムをつかうと怒られた

Railsでこんなエラーが出た。 ActiveRecord::SubclassNotFound in PostController#create The single-table inheritance mechanism failed to locate the subclass: '日本酒'. This error is raised because the column 'type' is reserved for storing the …

Google Cloud SDKをインストールした時のメモ

Google Cloud Platformをコマンドラインから操作したかったのでSDKをいれた。 Cloud SDK | Google Cloud ここからダウンロードして、展開したフォルダを任意のディレクトリ(hoge)に移動。 cd ./hoge して ./google-cloud-sdk/install.sh ./google-cloud-sdk/…