Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.3K
Views
Error de aplicación de Heroku Shopify 'npm ERR! ERESOLVE no pudo resolver el árbol de dependencias'

Saludos, tengo un problema con Heroku porque no quiero instalar paquetes heredados para mi aplicación Shopify, mi aplicación Shopify está en Github y acabo de configurar todo lo que necesita mi aplicación, pero cuando implemento la rama principal en Heroku obtengo este error en la consola Heroku a continuación, ¿alguien puede ayudarme a solucionarlo?

 -----> Building on the Heroku-20 stack -----> Using buildpack: heroku/nodejs -----> Node.js app detected -----> Creating runtime environment NPM_CONFIG_LOGLEVEL=error USE_NPM_INSTALL=true NODE_VERBOSE=false NODE_ENV=production NODE_MODULES_CACHE=false -----> Installing binaries engines.node (package.json): unspecified engines.npm (package.json): unspecified (use default) Resolving node version 16.x... Downloading and installing node 16.14.0... Using default npm version: 8.3.1 -----> Restoring cache Caching has been disabled because NODE_MODULES_CACHE=false -----> Installing dependencies Installing node modules (package.json + package-lock) npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: shopify-app-node@1.0.0 npm ERR! Found: react@16.14.0 npm ERR! node_modules/react npm ERR! react@"^16.10.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^17.0.2 || ^18.0.0-0" from next@12.0.10 npm ERR! node_modules/next npm ERR! next@"^12.0.2" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /tmp/npmcache.CTfHl/eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! /tmp/npmcache.CTfHl/_logs/2022-02-10T12_18_50_156Z-debug-0.log -----> Build failed We're sorry this build is failing! You can troubleshoot common issues here: https://devcenter.heroku.com/articles/troubleshooting-node-deploys Some possible problems: - Node version not specified in package.json https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version Love, Heroku ! Push rejected, failed to compile Node.js app. ! Push failed

Mi paquete.json

 { "name": "shopify-app-node", "version": "1.0.0", "description": "Shopify's node app for CLI tool", "scripts": { "test": "jest", "dev": "cross-env NODE_ENV=development nodemon ./server/index.js --watch ./server/index.js", "build": "NEXT_TELEMETRY_DISABLED=1 next build", "start": "cross-env NODE_ENV=production node ./server/index.js" }, "engines": { "node": "16.14.0", "npm": "8.4.1" }, "repository": { "type": "git", "url": "git+https://github.com/Shopify/shopify-app-node.git" }, "author": "Shopify Inc.", "license": "MIT", "bugs": { "url": "https://github.com/shopify/shopify-app-node/issues" }, "dependencies": { "@babel/core": "7.12.10", "@babel/polyfill": "^7.6.0", "@babel/preset-env": "^7.12.11", "@babel/register": "^7.12.10", "@shopify/app-bridge-react": "^2.0.2", "@shopify/app-bridge-utils": "^2.0.2", "@shopify/koa-shopify-auth": "^4.1.2", "@shopify/polaris": "^6.2.0", "apollo-boost": "^0.4.9", "axios": "^0.25.0", "cross-env": "^7.0.3", "dotenv": "^8.2.0", "graphql": "^14.5.8", "isomorphic-fetch": "^3.0.0", "koa": "^2.13.1", "koa-bodyparser": "^4.3.0", "koa-compress": "^5.1.0", "koa-cors": "0.0.16", "koa-logger": "^3.2.1", "koa-router": "^10.0.0", "koa-session": "^6.1.0", "mysql2": "^2.3.3", "next": "^12.0.2", "next-env": "^1.1.0", "node-fetch": "^2.6.7", "react": "^16.10.1", "react-apollo": "^3.1.3", "react-dom": "^16.10.1", "sequelize": "^6.13.0", "slugify": "^1.6.5", "validator": "^13.7.0", "webpack": "^4.44.1" }, "devDependencies": { "@babel/plugin-transform-runtime": "^7.12.10", "@babel/preset-stage-3": "^7.0.0", "babel-jest": "26.6.3", "babel-register": "^6.26.0", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.6", "husky": "^4.3.6", "jest": "26.6.3", "lint-staged": "^10.5.4", "nodemon": "^2.0.7", "prettier": "2.2.1", "react-addons-test-utils": "15.6.2", "react-test-renderer": "16.14.0" }, "husky": { "hooks": { "pre-commit": "lint-staged" } }, "lint-staged": { "*.{js,css,json,md}": [ "prettier --write" ] } }
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Su archivo de bloqueo contiene dependencias en conflicto. Dado que pudo reproducir el error localmente usando npm ci , tenemos una buena manera de probar una solución localmente.

Parece que depende directamente de React 16. ¿Es algo que necesita directamente o es solo una dependencia de Next.js?

Si no es algo que necesita directamente, actualícelo según los documentos de Next.js :

 npm install react@latest react-dom@latest

Eso debería modificar su package-lock.json . Luego intente instalar nuevamente desde el archivo de bloqueo con npm ci . Si eso soluciona las cosas, confirme el cambio y vuelva a implementar.

Por otro lado, si depende directamente de React 16 y no puede actualizar, deberá considerar volver a una versión anterior de Next.js.

over 4 years ago · Santiago Trujillo Report

0

  1. Instalo estos paquetes antiguos con npm install --force
  2. npm outdated
  3. Veo qué paquetes están en rojo
  4. Actualizo de la versión actual a la versión deseada con npm install --save packagename@wanted_version
  5. Elimine cualquier archivo vacío que pueda tener en su proyecto
  6. Subido a git
  7. Implementar en Heroku
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!