1
resposta

erro no npm start

Esse é o Erro que está dando ao da o npm start

> curso@0.1.0 start
> node scripts/start.js

i 「wds」: Project is running at http://192.168.0.81/
i 「wds」: webpack output is served from 
i 「wds」: Content not from webpack is served from C:\Users\gwpo\workspace\drf-escola_react\public
i 「wds」: 404s will fallback to /
Starting the development server...

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:79:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Users\gwpo\workspace\drf-escola_react\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\gwpo\workspace\drf-escola_react\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\Users\gwpo\workspace\drf-escola_react\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
C:\Users\gwpo\workspace\drf-escola_react\scripts\start.js:11
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:79:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\NormalModule.js:417:16)
    at C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\NormalModule.js:452:10
    at C:\Users\gwpo\workspace\drf-escola_react\node_modules\webpack\lib\NormalModule.js:323:13
    at C:\Users\gwpo\workspace\drf-escola_react\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at C:\Users\gwpo\workspace\drf-escola_react\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (C:\Users\gwpo\workspace\drf-escola_react\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at C:\Users\gwpo\workspace\drf-escola_react\node_modules\babel-loader\lib\index.js:59:103 {
  opensslErrorStack: [
    'error:03000086:digital envelope routines::initialization error',
    'error:0308010C:digital envelope routines::unsupported'
  ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.14.0
PS C:\Users\gwpo\workspace\drf-escola_react>
1 resposta

Oii, Gleiser, tudo bem?

Num tópico aqui do fórum, nosso aluno Gleison postou uma solução sobre o problema.

Você pode ir até o arquivo package.json. Ele possui este código:

"start": "react-scripts start",

E você altera para este:

"start": "react-scripts --openssl-legacy-provider start"

Depois, é só rodar o npm start de novo.

Se a dúvida persistir, estamos aqui.

Abraços!

Caso este post tenha lhe ajudado, por favor, marcar como solucionado ✓.