Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

144
Visualizações
Cannot read properties of undefined (reading 'transformFile') at Bundler.transformFile

I have updated node today and I'm getting this error:

error: TypeError: Cannot read properties of undefined (reading 'transformFile')
    at Bundler.transformFile (/Users/.../node_modules/metro/src/Bundler.js:48:30)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.transform (/Users/.../node_modules/metro/src/lib/transformHelpers.js:101:12)
    at async processModule (/Users/.../node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:18)
    at async traverseDependenciesForSingleFile (/Users/.../node_modules/metro/src/DeltaBundler/traverseDependencies.js:131:3)
    at async Promise.all (index 0)
    at async initialTraverseDependencies (/Users/.../node_modules/metro/src/DeltaBundler/traverseDependencies.js:114:3)
    at async DeltaCalculator._getChangedDependencies (/Users/.../node_modules/metro/src/DeltaBundler/DeltaCalculator.js:164:25)
    at async DeltaCalculator.getDelta (/Users/.../node_modules/metro/src/DeltaBundler/DeltaCalculator.js:94:16)

Other than that I haven't done anything unusual, so I'm not sure what to share. If I'm missing any info please comment and I'll add it.

While building the terminal also throws this error:

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 (/Users/.../node_modules/metro-cache/src/stableHash.js:19:8)
    at Object.getCacheKey (/Users/.../node_modules/metro-transform-worker/src/index.js:593:7)
    at getTransformCacheKey (/Users/.../node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:24:19)
    at new Transformer (/Users/.../node_modules/metro/src/DeltaBundler/Transformer.js:48:9)
    at /Users/.../node_modules/metro/src/Bundler.js:22:29
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

My node, npx and react-native versions are:

  • node: 17.0.0
  • npx: 8.1.0
  • react-native-cli: 2.0.1
over 4 years ago · Santiago Trujillo
8 Respostas
Responde à pergunta

0

I tried different node versions...same error. Uninstalled and tried new versions of Android Studio...same error. Started brand new projects from scratch...same error. Deleted node_modules and ran npm i...same error.

Here's what did work for me.

Run

npx react-native info

Towards the top of that readout, it should say what Node version you are using. (it told me I was using Node: 17.xx.x in a stray node_modules folder.)

My fix was simply renaming that folder(in case deleting it breaks a different project). Now when I run npx react-native info it tells me the correct node version(16.13.1) and all my projects are running in the emulator again!

over 4 years ago · Santiago Trujillo Relatório

0

Ran into the same issue with Node.js 17.0.0. To solve it, I downgraded to version 14.18.1, deleted node_modules and reinstalled.

over 4 years ago · Santiago Trujillo Relatório

0

Quick and dirty workaround (worked for me):

Add or update your package.json engines section with something like this to stop trying to build with Node 17.0.x Current, until you resolve the new OpenSSL PKCS8 format in the tls module:

  "engines": {
    "node": "<17",
    "npm": "<8.2"
  },
over 4 years ago · Santiago Trujillo Relatório

0

I experienced the same issue. Seems that the problem is due to version 17.x of Node.js. I solved downgrading to Node.js 16.12.0.

over 4 years ago · Santiago Trujillo Relatório

0

you can resolve it by downgrading the node js

> nvm list // to see all available node version

> nvm install 16.13.0 // to install the version I wanted 

> nvm use 16.13.0  // use the installed version
over 4 years ago · Santiago Trujillo Relatório

0

In case, you do the steps of @uzai sindiko and when you try to build, it fails again. And if you close the terminal, and then you check again node version, it says 17.3.1.

Then after you set nvm use 16.13.0 do also nvm uninstall 17.3.1 and then your project will be build.

Thanks

over 4 years ago · Santiago Trujillo Relatório

0

had the same issue. downgrade to version 16.13.1 from 17.3.0 and it worked great.

over 4 years ago · Santiago Trujillo Relatório

0

check your node version first using nvm list uninstall the unnecessary version of node using nvm uninstall version change the version with the version number which is in use. install the new version of node using nvm install version_number use the installed version of node using nvm use version_number . Replace version_number with the version of node you have installed.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda