Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Error ao fazer deploy da minha aplicação react

Estou tendo dificuldade para resolver esse problema já tentei de tudo, mas tá complicado pra resolver se alguém puder me dar um help fico agradecido.

12:59:46 AM: build-image version: 340a5296c836ef3d99ac1d871c6447bb7a417c33 (focal)
12:59:46 AM: buildbot version: 753118d3afc14c69f82e182875f5b12345d2942b
12:59:46 AM: Building without cache
12:59:46 AM: Starting to prepare the repo for build
12:59:46 AM: No cached dependencies found. Cloning fresh repo
12:59:46 AM: git clone --filter=blob:none https://github.com/anthonibs/cine-stream-app
12:59:46 AM: Preparing Git Reference refs/heads/main
12:59:46 AM: Parsing package.json dependencies
12:59:48 AM: Starting to install dependencies
12:59:48 AM: Python version set to 3.8
12:59:48 AM: Attempting Ruby version 2.7.2, read from environment
12:59:49 AM: Using Ruby version 2.7.2
12:59:49 AM: Started restoring cached go cache
12:59:49 AM: Finished restoring cached go cache
12:59:49 AM: Installing Go version 1.19.5 (requested 1.19.5)
12:59:54 AM: go version go1.19.5 linux/amd64
12:59:54 AM: Using PHP version 8.0
12:59:55 AM: v16.20.0 is already installed.
12:59:55 AM: Now using node v16.20.0 (npm v8.19.4)
12:59:55 AM: Enabling Node.js Corepack
12:59:55 AM: Started restoring cached build plugins
12:59:55 AM: Finished restoring cached build plugins
12:59:55 AM: Started restoring cached corepack dependencies
12:59:55 AM: Finished restoring cached corepack dependencies
12:59:55 AM: jq: error (at <stdin>:75): Cannot iterate over null (null)
12:59:55 AM: No npm workspaces detected
12:59:55 AM: Started restoring cached node modules
12:59:55 AM: Finished restoring cached node modules
12:59:56 AM: Installing npm packages using npm version 8.19.4
12:59:57 AM: npm ERR! code ERESOLVE
12:59:57 AM: npm ERR! ERESOLVE could not resolve
12:59:57 AM: npm ERR!
12:59:57 AM: npm ERR! While resolving: react-scripts@5.0.1
12:59:57 AM: npm ERR! Found: typescript@5.0.4
12:59:57 AM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
12:59:57 AM: npm ERR! node_modules/typescript
12:59:57 AM: npm ERR!   dev typescript@"^5.0.3" from the root project
12:59:57 AM: npm ERR!   peer typescript@">= 2.7" from fork-ts-checker-webpack-plugin@6.5.3
12:59:57 AM: npm ERR!   node_modules/fork-ts-checker-webpack-plugin
12:59:57 AM: npm ERR!     fork-ts-checker-webpack-plugin@"^6.5.0" from react-dev-utils@12.0.1
12:59:57 AM: npm ERR!     node_modules/react-dev-utils
12:59:57 AM: npm ERR!       react-dev-utils@"^12.0.1" from react-scripts@5.0.1
12:59:57 AM: npm ERR!       node_modules/react-scripts
12:59:57 AM: npm ERR!         react-scripts@"^5.0.1" from the root project
12:59:57 AM: npm ERR!   1 more (tsutils)
12:59:57 AM: npm ERR!
12:59:57 AM: npm ERR! Could not resolve dependency:
12:59:57 AM: npm ERR! peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
12:59:57 AM: npm ERR! node_modules/react-scripts
12:59:57 AM: npm ERR!   react-scripts@"^5.0.1" from the root project
12:59:57 AM: npm ERR!
12:59:57 AM: npm ERR! Conflicting peer dependency: typescript@4.9.5
12:59:57 AM: npm ERR! node_modules/typescript
12:59:57 AM: npm ERR!   peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
12:59:57 AM: npm ERR!   node_modules/react-scripts
12:59:57 AM: npm ERR!     react-scripts@"^5.0.1" from the root project
12:59:57 AM: npm ERR!
12:59:57 AM: npm ERR! Fix the upstream dependency conflict, or retry
12:59:57 AM: npm ERR! this command with --force, or --legacy-peer-deps
12:59:57 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
12:59:57 AM: npm ERR!
12:59:57 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
12:59:57 AM: npm ERR! A complete log of this run can be found in:
12:59:57 AM: npm ERR!     /opt/buildhome/.npm/_logs/2023-05-16T03_59_56_309Z-debug-0.log
12:59:57 AM: Error during npm install
12:59:57 AM: Build was terminated: dependency_installation script returned non-zero exit code: 1
12:59:57 AM: Failing build: Failed to install dependencies
12:59:57 AM: Finished processing build request in 11.831s
1 resposta
solução!

Olá Anthoni, tudo bem?

Pelo que entendi, você está tendo dificuldades para fazer deploy da sua aplicação React e está recebendo um erro ao tentar instalar as dependências.

Pelo log que você compartilhou, parece que o erro está relacionado a uma dependência do pacote react-scripts. Uma possível solução seria tentar instalar uma versão mais recente do pacote, ou verificar se há alguma dependência conflitante com a versão do typescript que você está utilizando.

Além disso, sugiro que você verifique se todas as dependências estão corretamente listadas no arquivo package.json e se as versões estão compatíveis entre si.

Espero ter ajudado e bons estudos!