Installation fails in Termux (Android)
- Linguagem predominante
- C++
- Estrelas
- 17
- Forks
- 5
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### 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."
```
Guia de contribuição
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- android, cpp, node.js, shell
- Domínio
- build-system, mobile-dev
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Pouca atividade
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 45/100