2
0

More than 1 year has passed since last update.

GitHub ActionsでVariable 'AbortSignal' must be of type と言われるエラーの対処法

Last updated at Posted at 2022-11-24

こんにちは。virapture株式会社でCEOしながらラグナロク株式会社でもCKOとして働いている@mogmetです。

本日はトラブルシュート記事です。

原因

GitHub Actionsでビルドしたら突然下記のエラーに襲われました。

../../node_modules/@types/node/globals.d.ts(72,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'AbortSignal' must be of type '*** new (): AbortSignal; prototype: AbortSignal; abort(reason?: any): AbortSignal; timeout(milliseconds: number): AbortSignal; ***', but here has type '*** new (): AbortSignal; prototype: AbortSignal; timeout(milliseconds: number): AbortSignal; ***'.

どうやらAbortSignalという型が競合してるみたいです。

解決法

下記issueにありました。

どうやら@types/nodeをupdateすれば治るようです。
なので、一度入れ直して再度インストールした上でビルドしたら治りました。

$ yarn remove @types/node
$ yarn add @types/node -D

まとめ

@types/nodeをアップデートせよ!

最後に、ワンナイト人狼オンラインというゲームを作ってます!よかったら遊んでね!

他にもCameconOffcha、問い合わせ対応が簡単にできるCSmart、フリーランスのコミュニティのNextFreelanceといったサービスも作ってるのでよかったら使ってね!

また、チームビルディングや技術顧問、Firebaseの設計やアドバイスといったお話も受け付けてますので御用の方は弊社までお問い合わせください。

ラグナロクでもエンジニアやデザイナーのメンバーを募集しています!!楽しくぶち上げたい人はぜひお話ししましょう!!

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