question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

got ERR_OSSL_EVP_UNSUPPORTED when using node 17 and react 17 on expo

See original GitHub issue

Do you want to request a feature or report a bug? BUG

What is the current behavior? the error is coming from metro. one way to get it is to run “expo start”. it returns a qrcode and then shows this error : ERR_OSSL_EVP_UNSUPPORTED

im sorry i dont know how to acces metro config/parameters.

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.

# npm install -g expo-cli
# expo init my-app
# cd my-app
# expo start
Logs for your project will appear below.
Failed to construct transformer:  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at stableHash (/root/docker/gextrareact/node_modules/metro-cache/src/stableHash.js:19:8)
    at Object.getCacheKey (/root/docker/gextrareact/node_modules/metro-transform-worker/src/index.js:647:7)
    at getTransformCacheKey (/root/docker/gextrareact/node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:32:19)
    at new Transformer (/root/docker/gextrareact/node_modules/metro/src/DeltaBundler/Transformer.js:180:28)
    at /root/docker/gextrareact/node_modules/metro/src/Bundler.js:58:29 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

What is the expected behavior? working

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.

metro : 0.64.0

System: OS: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa) Shell: 5.0.17 - /bin/bash Binaries: Node: 17.0.1 - /usr/local/bin/node Yarn: 1.22.15 - /usr/local/bin/yarn npm: 8.1.1 - /usr/local/bin/npm npmPackages: expo: ^43.0.0 => 43.0.0 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.2 => 0.64.2 npmGlobalPackages: expo-cli: 4.12.10 Expo Workflow: managed

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

4reactions
madandrijacommented, Nov 2, 2021

Encountered the same error after upgrading to node v17.0.1. The error seems to originate from the transformFile method in the Bundler class. I suspect that the dependency graph is failing to load which results in an undefined transformer instance. I’m using react-native-cli so I doubt the error has any relation to Expo. Took all the necessary steps to reset metro’s cache which didn’t help. Perhaps there’s a transformer option that can be added to the configuration file that I’m not aware of? The only solution I can think of for now is to downgrade node and wait for a patch.

The screenshot of my error stack. digital-envelope-routines-initialization-error

I have the same issue with my non-expo application, the only thing that worked for me was also:

Resolved the issue by running the application with the latest LTS version of node (16.13.0). The new major release has most likely introduced a breaking change within metro.

4reactions
klynemcommented, Oct 27, 2021

Resolved the issue by running the application with the latest LTS version of node (16.13.0). The new major release has most likely introduced a breaking change within metro.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-scripts fails to build project with Node 17 #11562 - GitHub
Describe the bug we have a CRA app, it used to build with Node 14.x very fine, today I upgrade nodejs to 17.0.0...
Read more >
How To Fix ERR_OSSL_EVP_UNSUPPORTED In React JS ...
You are using Node JS 17 and hitting this error during application start up using npm start command. Error The error ERR_OSSL_EVP_UNSUPPORTED has...
Read more >
Node.js 17.0.1 Gatsby error - "digital envelope routines
Quick fix: Run this in a terminal inside your React project. ... This issue comes with the new update of Node.js 17. In...
Read more >
React v17.0 – React Blog
Today, we are releasing React 17! We've written at length about the role of the React 17 release and the changes it contains...
Read more >
expo err_ossl_evp_unsupported - You.com | The AI Search ...
Node.js version 17 has switched to using OpenSSL 3.0. They advise: ... expo/expo-cligot ERR_OSSL_EVP_UNSUPPORTED when using node 17 and react 17#3943.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found