-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Environment Information
- OS: any
- Node Version: any
- NPM Version: any
- C++ Toolchain: any
- confluent-kafka-javascript version: 1.5.0
Steps to Reproduce
library uses such confluent-kafka-javascript
as module_name for node-pre-gyp. but:
-
node-pre-gyp replaces first dash with underscore (even last version of node-pre-gyp), https://github.com/mapbox/node-pre-gyp/blob/f9b39484f17955d83cdab42c178a600467fe96bd/lib/util/versioning.js#L312, so
validModuleName
transforms intoconfluent_kafka-javascript
. -
npm replaces all dashes for npm config, so it always will transform it into
npm_config_confluent_kafka_javascript_binary_host_mirror
-
as result mirror will not be possible to set/use, because this will never work:
const host = process.env['npm_config_' + validModuleName + '_binary_host_mirror'] || package_json.binary.host;
have: npm_config_confluent_kafka_javascript_binary_host_mirror
want: npm_config_confluent_kafka-javascript_binary_host_mirror
So, I see only two options here - a) fix node-pre-gyp or b) change module_name and replace dashes with underscore. suppose b) is easier and npm config is not working anyway