LoginSignup
0

More than 3 years have passed since last update.

AWS LambdaでNODE_MODULE_VERSION系のエラーが起きたときの早見表

Posted at

こういうエラーに遭遇することがある。

Something went wrong installing the "sharp" module

The module '/opt/nodejs/node_modules/sharp/build/Release/sharp.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

- Ensure the version of Node.js used at install time matches that used at runtime
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues

NODE_MODULE_VERSIONはどこでみる?

ここで確認できる。
https://nodejs.org/ja/download/releases/

AWS Lambdaの場合

それぞれ以下のruntimeになる。

  • NODE_MODULE_VERSION 57: nodejs8.10
  • NODE_MODULE_VERSION 64: nodejs10.x
  • NODE_MODULE_VERSION 72: nodejs12.x

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
What you can do with signing up
0