1
resposta

[Projeto] Erro ao usar o comando npm start

No curso React Native: criando menu e navegando entre telas onde ela ensina a baixar o projeto e rodar, estou com problema ao rodar o projeto com npm start e logo em seguida npm run ios

npm start :

alysson@Mac-mini-de-FcxLabs react-native-navegacao-entre-telas % npm start  

> orgsnavegacao@0.0.1 start
> react-native start


                        #######                       
                   ################                   
                #########     #########               
            #########             ##########          
        #########        ######        #########      
       ##########################################     
      #####      #####################       #####    
      #####          ##############          #####    
      #####    ###       ######       ###    #####    
      #####    #######            #######    #####    
      #####    ###########    ###########    #####    
      #####    ##########################    #####    
      #####    ##########################    #####    
      #####      ######################     ######    
       ######        #############        #######     
         #########        ####       #########        
              #########          #########            
                  ######### #########                 
                       #########                      


                    Welcome to Metro!
              Fast - Scalable - Integrated



To reload the app press "r"
To open developer menu press "d"

watchman warning:  Recrawled this watch 1 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/alysson/Documents/code/react-native-navegacao-entre-telas' ; watchman watch-project '/Users/alysson/Documents/code/react-native-navegacao-entre-telas'`

Recrawled this watch 1 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/alysson/Documents/code/react-native-navegacao-entre-telas' ; watchman watch-project '/Users/alysson/Documents/code/react-native-navegacao-entre-telas'`

Failed to construct transformer:  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at stableHash (/Users/alysson/Documents/code/react-native-navegacao-entre-telas/node_modules/metro-cache/src/stableHash.js:19:8)
    at Object.getCacheKey (/Users/alysson/Documents/code/react-native-navegacao-entre-telas/node_modules/metro-transform-worker/src/index.js:593:7)
    at getTransformCacheKey (/Users/alysson/Documents/code/react-native-navegacao-entre-telas/node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:24:19)
    at new Transformer (/Users/alysson/Documents/code/react-native-navegacao-entre-telas/node_modules/metro/src/DeltaBundler/Transformer.js:48:9)
    at /Users/alysson/Documents/code/react-native-navegacao-entre-telas/node_modules/metro/src/Bundler.js:22:29
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

ja fui no xcode tentar abrir e dar o mesmo erro build failed

já reiniciei a maquina. enfim.. não funciona ;)

1 resposta

Olá, Alysson!

Entendo que você está enfrentando um problema ao tentar rodar o projeto no React Native usando o comando "npm start" e, em seguida, "npm run ios". O erro que está aparecendo indica que houve uma falha na construção do transformador.

Uma possível solução para esse problema é limpar o cache do Metro, que é o servidor de desenvolvimento do React Native. Para fazer isso, você pode executar os seguintes comandos no terminal:

watchman watch-del '/Users/alysson/Documents/code/react-native-navegacao-entre-telas' ; watchman watch-project '/Users/alysson/Documents/code/react-native-navegacao-entre-telas'

Após executar esses comandos, tente rodar novamente o projeto usando "npm start" e "npm run ios" para ver se o erro persiste.

Caso o problema ainda persista, sugiro verificar se todas as dependências do projeto estão corretamente instaladas e atualizadas. Além disso, certifique-se de que o ambiente de desenvolvimento esteja configurado corretamente, incluindo o Xcode.

Se mesmo assim o erro persistir, pode ser necessário investigar mais a fundo o motivo dessa falha na construção do transformador.

Espero ter ajudado e bons estudos!