LoginSignup
0
0

sharp の「Could not load the "sharp" module using the win32-x64 runtime」エラーの解決方法

Posted at

現象

Node.js の画像処理モジュールの sharp をバージョンアップしたら以下エラーが発生。

Error
Could not load the "sharp" module using the win32-x64 runtime

原因

sharp のバージョンを 0.33.x にすると発生。

解決方法

Windows x64用の sharp(@img/sharp-win32-x64) をインストールします。

警告が表示されますが、エラーは発生しなくなりました:blush:

npm i -D @img/sharp-win32-x64

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@img/sharp-win32-x64@0.33.2',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^18.17.0 || ^20.3.0 || >=21.0.0',
npm WARN EBADENGINE     npm: '>=9.6.5',
npm WARN EBADENGINE     yarn: '>=3.2.0',
npm WARN EBADENGINE     pnpm: '>=7.1.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v20.10.0', npm: '8.15.0' }
npm WARN EBADENGINE }
0
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
0
0