LoginSignup
0
0

More than 1 year has passed since last update.

hashlips_art_engine詰まったのでメモ

Posted at

実行成功した際のバージョン

os: mac intel 10.15.7
node: v18.1.0
npm: 8.8.0
canvas: 2.11.0

詰まった内容

node index.jsを実行するとエラーが発生する。
投稿を参考にnodeのバージョンをダウングレードしてみたりしたが、
エラー内容変化するだけで以前エラーが発生する。

canvasモジュールがインストールされていないとのエラーが出る

$ node index.js
node:internal/modules/cjs/loader:1189
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The module '/nft/hashlips_art_engine/node_modules/canvas/build/Release/canvas.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 108. Please try re-compiling or re-installing

解決した手順

  1. node_moduleを削除
    rm -rf node_modules/

  2. npm install
    nodeのバージョンを最新版(v18.1.0)にしてインストール

  3. npm install canvas
    npm installでcanvasインストールできていなかったので、canvasをインストール

  4. node index.js
    成功

以上

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