npm run serve error:0308010C
-
@chrishamm - I'm setting up a new DWC dev environment on Fedora 36, but I cannot get npm serve to run. I have tried multiple node.js versions, and clean installs (including re-installing OS), but every time I get:
> duetwebcontrol@3.4.0 serve > vue-cli-service serve INFO Starting development server... 10% building 2/5 modules 3 active ...3.4.0/node_modules/eslint-loader/index.js??ref--14-0!/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/src/main.jsError: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at module.exports (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/NormalModule.js:471:10) at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/NormalModule.js:503:5 at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/NormalModule.js:358:12 at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at iterateNormalLoaders (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:221:10) at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:236:3 at runSyncOrAsync (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:130:11) at iterateNormalLoaders (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:232:2) at Array.<anonymous> (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 node:internal/crypto/hash:67 this[kHandle] = new _Hash(algorithm, xofLen); ^ Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at module.exports (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/NormalModule.js:471:10) at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/NormalModule.js:503:5 at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/webpack/lib/NormalModule.js:358:12 at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at Array.<anonymous> (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 at /home/minty/Development/Duet/BtnCmd/DuetWebControl-3.4.0/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' }
I'm fairly sure this is environment related, and after some cursory research I can only find vauge references to key length / openSSL 3.0 being the culprit.
Any Ideas?
-
@mintytrebor i take it you've ran
npm install
first? -
@jay_s_uk Yes
-
OK. Figured it out... It is indeed down to OpenSSL 3.0 - Posting resolution in case anyone else comes accross this issue:
Edit the openssl.cnf file and enable the legacy provider options. eg:
# Uncomment the sections that start with ## below to enable the legacy provider. # Loading the legacy provider enables support for the following algorithms: # Hashing Algorithms / Message Digests: MD2, MD4, MDC2, WHIRLPOOL, RIPEMD160 # Symmetric Ciphers: Blowfish, CAST, DES, IDEA, RC2, RC4,RC5, SEED # Key Derivation Function (KDF): PBKDF1 # In general it is not recommended to use the above mentioned algorithms for # security critical operations, as they are cryptographically weak or vulnerable # to side-channel attacks and as such have been deprecated. [provider_sect] default = default_sect legacy = legacy_sect [default_sect] activate = 1 [legacy_sect] activate = 1
Save and reboot.
npm run serve should now workNote: On Fedora 36 openssl.cnf file is located in /etc/pki/tls - it may vary per distro.
-
-