Expo React Native | code: ‘ERR_OSSL_EVP_UNSUPPORTED’

Solução para o erro no expo quando executa no terminal no macos ou linux:

Error: error:0308010C:digital envelope routines::unsupported

    at new Hash (node:internal/crypto/hash:71:19)

    at Object.createHash (node:crypto:133:10)

    at module.exports

    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’

}

Solução:

For now, a workaround would be to set NODE_OPTIONS=--openssl-legacy-provider (see comment).

  • For Windows/Linux/Mac: npx cross-env NODE_OPTIONS=--openssl-legacy-provider expo start --web
  • For Linux/Mac: NODE_OPTIONS=--openssl-legacy-provider expo start --web

Fonte: https://github.com/webpack/webpack/issues/14532

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *