Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Problem with node-gyp on termux #3858

Open
bajrangCoder opened this issue Feb 25, 2024 · 5 comments
Open

[Bug]: Problem with node-gyp on termux #3858

bajrangCoder opened this issue Feb 25, 2024 · 5 comments

Comments

@bajrangCoder
Copy link

bajrangCoder commented Feb 25, 2024

Problem description

Error while installing node-pty(or any npm package which need node-gyp). Tried in many devices still same issue . Before it used to work . Stopped working recently.
And it working fine on Linux os, Userland terminal but not on termux.
I am pretty sure that it's termux specific issue.

Screenshot

Steps to reproduce the behavior.

Try to install any node-gyp package.
For eg:
node-pty or try to install this package:

npm i -g acodex-server

What is the expected behavior?

It should install package successfully without any issue

System information

  • Termux application version: latest from GitHub release section
  • Android OS version: 13,10,11
  • Device model: tested on many devices such as moto edge 40, infinix , Samsung,etc
@legendSabbir
Copy link

Same issue for me also . It was working just fine . Just stopped working recently . Also there is a lot of user for this . So kindly fix this issue

@7HR4IZ3
Copy link

7HR4IZ3 commented Feb 25, 2024

Screenshot_2024-02-25-18-24-14-503_com foxdebug acode

I was able to install it by installing 'node-gyp' separately then add argv.push('-Dandroid_ndk_path=""') the 'node_modules/node-gyp/lib/configure.js' file.

I'm manually defining the android_ndk_path variable this works because also the variable is required, it isn't actually being used, but it needed the value could be set to the actual android-ndk path.

Check out Termux NDK to install Android NDK on Termux.

7HR4IZ3 added a commit to 7HR4IZ3/node-gyp that referenced this issue Feb 25, 2024
…g.gyp while trying to load binding.gyp'

Specifying a default value for the 'android_ndk_path'' variable fixes this issue at 'termux/termux-app#3858'
@bajrangCoder
Copy link
Author

Screenshot_2024-02-25-18-24-14-503_com foxdebug acode

I was able to install it by installing 'node-gyp' separately then add argv.push('-Dandroid_ndk_path=""') the 'node_modules/node-gyp/lib/configure.js' file.

I'm manually defining the android_ndk_path variable this works because also the variable is required, it isn't actually being used, but it needed the value could be set to the actual android-ndk path.

Check out Termux NDK to install Android NDK on Termux.

This isn't applicable, if you have any other solution then suggest...

@7HR4IZ3
Copy link

7HR4IZ3 commented Feb 28, 2024

Adding this to '~/.gyp/include.gypi' fixes the problem without the need to edit the source code.

You have to create the '.gyp' folder first.

{
	'variables': {
		'android_ndk_path': ''
	}
}

@ahaoboy
Copy link

ahaoboy commented May 1, 2024

same issue, https://github.com/coder/code-server, install dep https://www.npmjs.com/package/argon2 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants