blog
copyright ©
creamu Inc. All Rights Reserved.
art direction & design: Kunitaka Kawashimo
code, interaction & photography: creamu Inc.
category: Technology

npm rebuildでエラーを解決した/UnhandledPromiseRejectionWarning: Error: Could not locate the bindings file. Tried:

Pocket

MacBook Pro をM1 Max からM2 Maxに買い替えて、環境構築中なんですが、今まで動いていたNuxt.jsのプロジェクトが動かなくなり困りました。

UnhandledPromiseRejectionWarning: Error: Could not locate the bindings file. Tried:

上記のエラーが出ていて、npm run devできなかったんですが、npm rebuildすることで解決しました。

ref: Error: Could not locate the bindings file

ちなみに、node系のコマンドは以下。

nodeのバージョンを表示
node -v

nodebrew ls
インストールされているnodeの一覧を表示(current: には現在使用しているバージョンが表示される)

nodebrew use v14.18.0
lsで表示された、v14.18.0を使用する