node.js Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported React Native

Viewed 2216

error picture

Have problems with installing the app on android emulator OS: Windows 10 command doesn't solve the problem

set NODE_OPTIONS=--openssl-legacy-provider
2 Answers

A potential issue that's causing this problem could be related to your node version. If you're using nvm to manage your node versions and have recently updated to the latest release, consider reverting back to the version that version. You can view the version in use with nvm ls. Change to an older LTS release with nvm use <version_here>.

The problem is your node version is higher and not compatible with the version in react native

  1. Firstly set your node version default to "v14.17.6"
  2. Run this command nvm alias default 16.14.2
  3. Clean node modules and do ./gradlew clean.
  4. If iOS, delete podfile.lock and do pod install.
Related