You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm now running Node 18 on my desktop. I've run into one issue so far -- react-native start fails with the following error:
info Reloading app...
Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at stableHash (/home/greg/z/mobile/node_modules/metro-cache/src/stableHash.js:19:8)
at Object.getCacheKey (/home/greg/z/mobile/node_modules/metro-transform-worker/src/index.js:593:7)
at getTransformCacheKey (/home/greg/z/mobile/node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:24:19)
at new Transformer (/home/greg/z/mobile/node_modules/metro/src/DeltaBundler/Transformer.js:48:9)
at /home/greg/z/mobile/node_modules/metro/src/Bundler.js:22:29 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
In short it seems that newer Node uses a newer OpenSSL, which has dropped some ancient crypto primitives, but some tools -- Webpack in the case of that SO question, Metro in our case -- are still trying to use them.
The immediate workaround, which I'm using for now, is to say NODE_OPTIONS=--openssl-legacy-provider react-native start. This should leave things no worse off than with Node v16.
A better fix would be one that switches off of those ancient, now-unsupported crypto algorithms. Upgrading Webpack apparently does that when the issue is in Webpack. Perhaps upgrading Metro will do it for us?
The successor to #4263.
Node 18 was released 2022-04-19. It will shortly (2022-10-25) be the "active LTS", and will be supported until 2025-04-30. See schedule: https://github.com/nodejs/Release#readme
The text was updated successfully, but these errors were encountered: