github / github/node-keytar

Installation fails in Termux (Android)

オープン
#22 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
17
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

説明

### Description
Attempting to install `node-keytar` globally (`npm install -g keytar`) on Termux (Android) fails due to missing build-time dependencies and the lack of prebuilt binaries for this architecture.

### Reproduction Steps
1. Open Termux on Android.
2. Run `npm install -g keytar`.

### Expected Behavior
Successful installation and compilation of the native module.

### Actual Behavior
The installation fails with:
`Error: Cannot find module 'node-addon-api'`

And subsequently:
`gyp: Call to 'node -p "require('node-addon-api').include_dir"' returned exit status 1 while in binding.gyp.`

### Workaround
The following steps allow successful installation on Termux:
1. Clone the repository.
2. `npm install` (to install dependencies like `node-addon-api`).
3. `npm run build` (to compile the native module).
4. `npm install -g . --ignore-scripts` (to install globally, bypassing unnecessary re-compilation).

A script to automate this is attached below for reference:

```bash
#!/bin/bash
# Install node-keytar globally from current directory

echo "Installing dependencies..."
npm install

echo "Building native module..."
npm run build

echo "Installing globally..."
npm install -g . --ignore-scripts

echo "Done."
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reproducing `npm install -g keytar` in Termux and inspect `binding.gyp` together with the npm install and build entry points. Compare the failing dependency lookup with the documented `npm install`, `npm run build`, and global-install workaround; done means the documented global installation succeeds on Termux without that workaround.

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

評価

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

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

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