✔︎Pickup

windowsを使ってnode-gypのbuildを実行したらgyp ERRが発生しました

node-gyp build

gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.14.0 | win32 | x64
gyp ERR! build error 
gyp ERR! stack Error: You must run `node-gyp configure` first!
gyp ERR! stack     at ReadFileContext.<anonymous> (C:\Users\admin\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:43:20)
gyp ERR! stack     at ReadFileContext.callback (C:\Users\admin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\graceful-fs\graceful-fs.js:123:16)
gyp ERR! stack     at FSReqCallback.readFileAfterOpen [as oncomplete] (node:fs:314:13)
gyp ERR! System Windows_NT 10.0.19044
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd C:\Users\admin\Desktop\multiCPU
gyp ERR! node -v v16.14.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok

エラーをよく読んでみるとnode-gyp configureを先に実行しろと書いてあります。

使い方をnode-gypのReadmeを見てみます。

https://github.com/nodejs/node-gyp#how-to-use

確かにnode-gyp buildの前にnode-gyp configureを実行することと書かれていました。

ビルドの方法

node-gyp configure
node-gyp build

ちょっとめんどくさいので、調べてみると、node-gyp rebuildというコマンドがありましたので

node-gyp rebuild

今度からこちらで実行していきたいと思います。

ブログ村リンク
ポチッと押してね!フォローもしてね!

ブログランキング・にほんブログ村へ
にほんブログ村
おすすめの記事