Nisha Patel
Query: Fix Error: error:0308010C:digital envelope routines::unsupported with react na…
Problem
I have a react native web app. And after I do expo start. I choose for w-web. But then I get this error:
I am using node.js version v20.10.0.
And my package.json file looks like:
Question: how to resolve the error: error:0308010C:digital envelope routines::unsupported
Solution
The error caused by version incompatibility between node.js and OpenSSL. And one way to solve it is using a flag called --openssl-legacy-provider that can setup in package.json.
If encountering error like;
Error: Cannot find module 'expo/config'
Make sure expo already installed in project by running npm install expo or yarn add expo.
If done already and still error check the module reference. You should use require('@expo/config') not require('expo/config'). You can find the file at "AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\webpack-config\webpack\env" (like on this case).
Suggested blogs:
>How to conditionally render different arrays in React?
>Fix react useState and array.map not work issue
>Making infinite scrolling using react-query
>How does React State with JSON arrays affect performance?
>setlist{nosep} not work in the acronym package
>Fix ScrollIntoView not working issue
>Testing react component with jest
>How you can Show or hide elements in React?
>Testing react components using Hooks and Mocks
>Tips for using React Redux Hooks to show or hide React components