prebuild / prebuild-install

Minimal install client for prebuilds.
MIT License
104 stars 75 forks source link

Can't install package in private network #178

Closed khabirovar closed 2 years ago

khabirovar commented 2 years ago

Hi! I try install kerberos@1.1.4 in private network. I already upload in nexus prebuild for kerberos and add string for using this prebuilds: kerberos_binary_host=http://nexus/repository/local-repo/npm/kerberos-v1.1.4-node-v72-linux-x64.tar.gz in .npmrc

But i have error [91mprebuild-install WARN install No prebuilt binaries found (target=12.22.5 runtime=node arch=x64 libc= platform=linux) 08:16:24 [0m [91mgyp [0m [91m WARN install got an error, rolling back install kerberos-v1.1.4-node-v72-linux-x64.tar.gz

Maybe i use wrong prebuilds How can i generate right prebuild or maybe need add something .npmrc

lovell commented 2 years ago

Did you see https://github.com/prebuild/prebuild-install#custom-binaries ?

Note that the package version subpath and file name will still be appended.

khabirovar commented 2 years ago

Yeah. but didn't help. I add kerberos_binary_host=http:///kerveros-v1.1.4-node-v72-linux-x64.tar.gz in .npmrc but get error kerberos

i try bunch of prebuilds in tar.gz format kerberos2 some generated via prebuild utility some taken from npm cache

fyi i try install this package on host without access to internet

lovell commented 2 years ago

Did you read and comprehend https://github.com/prebuild/prebuild-install#custom-binaries including the example it provides?

Please note how the version and filename will be appended to the base URL you provide in the environment variable.

For example, if you set:

kerberos_binary_host=http://nexus/repository/local-repo/npm/kerberos-v1.1.4-node-v72-linux-x64.tar.gz

then the following URL will be used:

http://nexus/repository/local-repo/npm/kerberos-v1.1.4-node-v72-linux-x64.tar.gz/v1.1.4/kerberos-v1.1.4-node-v72-linux-x64.tar.gz

which is probably not what you meant.

If you set:

kerberos_binary_host=http://nexus/repository/local-repo/npm

then the following URL will be used:

http://nexus/repository/local-repo/npm/v1.1.4/kerberos-v1.1.4-node-v72-linux-x64.tar.gz

which is closer to what you want, but you'll need to create versioned subdirectories to match.

khabirovar commented 2 years ago

A lot of thanks to you. It helped me.