Error issues while compiling app-settings

Hello @diana @mrjones

I have run into an issue while uploading app settings on the remote cht instance as seen below

cliff@cliffs-MacBook-Pro config % cht --url=https://medic:password@cht.openelis-global.org compile-app-settings upload-app-settings
INFO Checking that https://medic:****@cht.openelis-global.org/medic/ is available... 
INFO Processing config in config. 
INFO Actions:
     - compile-app-settings
     - upload-app-settings 
INFO Starting action: compile-app-settings… 
WARN app_settings.json file should not be edited directly.
    Please create a base_settings.json file in app_settings folder and move any manually defined configurations there. 
INFO Packaging contact-summary 
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/usr/local/lib/node_modules/cht-conf/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/usr/local/lib/node_modules/cht-conf/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/usr/local/lib/node_modules/cht-conf/node_modules/webpack/lib/NormalModule.js:471:10)
    at /usr/local/lib/node_modules/cht-conf/node_modules/webpack/lib/NormalModule.js:503:5
    at /usr/local/lib/node_modules/cht-conf/node_modules/webpack/lib/NormalModule.js:358:12
    at /usr/local/lib/node_modules/cht-conf/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/usr/local/lib/node_modules/cht-conf/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/usr/local/lib/node_modules/cht-conf/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/usr/local/lib/node_modules/cht-conf/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /usr/local/lib/node_modules/cht-conf/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /usr/local/lib/node_modules/cht-conf/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.0.0
cliff@cliffs-MacBook-Pro config %

any thoughts on what could be causing this failure ?

Hi @cliff ,
It seems like you are using Node.js v20.0.0. cht-conf is currently not supported in Node v20. We have an issue tracking support for this version here. In the meantime, you can try with earlier versions.

1 Like

@cliff - you may consider using nvm to manage which version of node you’re using as well as switch between different versions easily.

1 Like

thanks @yuv ,yes am using node 20

thanks @mrjones let me downgrade to an earlier version

The error ‘ERR_OSSL_EVP_UNSUPPORTED’ that you are facing while uploading app settings on the remote cht instance. The error arises when an application needs to use an encryption, decryption, signing, or verification algorithm not supported or implemented by the version of OpenSSL being used. This may occur as a result of, or when the application programs make use of old algorithms or non-standard implementations, or when the required cryptographic modules have not been compiled into OpenSSL during the build process.

There are different causes for the error to occur and the ways to fix it properly; you need to understand them properly in detail.Hope it helps!