npm install fails due to node-gyp rebuild step depending on packages built for old versions of Node

オープン
#8 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp, node.js
領域
build-system

調査の方向性

Node v15 で npm install openbabel の失敗を再現し、src/atom.cpp と src/mol.h から始まるネイティブビルドパスを、node_modules/nan/nan.h で報告されているエラーと併せて調査します。現在の Node バージョンでパッケージがインストールされ、node-gyp rebuild が正常に完了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Hi there! I'm extremely interested in using this package (it's the lightest-weight and best looking package out there) but can't install it on a current-ish version of node (e.g. node v15).

npm install openbabel fails due to node-gyp rebuild failing, due to what looks like an outdated version of the nan package built for older versions of node? Not 100% sure as I don't work with C++ builds/compiling to a node package. But I'm guessing you'll have greater insight.

> [email protected] install /Users/xxx/xxx-app/node_modules/openbabel
> node-gyp rebuild

  CXX(target) Release/obj.target/openbabel/src/atom.o
In file included from ../src/atom.cpp:2:
In file included from ../src/mol.h:11:
In file included from ../node_modules/nan/nan.h:111:
../node_modules/nan/nan_new.h:24:43: error: no member named 'Handle' in namespace 'v8'
template <typename T> v8::Local<T> To(v8::Handle<v8::Integer> i);
                                      ~~~~^
../node_modules/nan/nan_new.h:24:61: error: expected '(' for function-style cast or type construction
template <typename T> v8::Local<T> To(v8::Handle<v8::Integer> i);
                                                 ~~~~~~~~~~~^
../node_modules/nan/nan_new.h:24:63: error: use of undeclared identifier 'i'
template <typename T> v8::Local<T> To(v8::Handle<v8::Integer> i);

. . .
. . .
etc.
etc.

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/openbabel/src/atom.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/xxx/.nvm/versions/node/v15.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:378:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/xxx/.nvm/versions/node/v15.9.0/bin/node" "/Users/adam/.nvm/versions/node/v15.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xxx/xxx-app/node_modules/openbabel
gyp ERR! node -v v15.9.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
主要言語
C++
スター
27
フォーク
7
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mohebifar/openbabel-node のほかの issue

mohebifar/openbabel-node の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。