hookrouter icon indicating copy to clipboard operation
hookrouter copied to clipboard

Application won't deploy on Heroku due to hookrouter

Open seanbelverstone opened this issue 2 years ago • 1 comments

Hi there. I've been using hookrouter well for the last year or so, but as of last week i'm suddenly getting errors when trying to deply to Heroku with it. Here's the build log:

-----> Using buildpack: https://github.com/mars/create-react-app-buildpack.git
-----> React.js (create-react-app) multi app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
=====> Detected Framework: Multipack
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       
-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 16.x...
       Downloading and installing node 16.13.2...
       Using default npm version: 8.1.2
       
-----> Restoring cache
       Cached directories were not restored due to a change in version of node, npm, yarn or stack
       Module installation may take longer for this build
       
-----> Installing dependencies
       Installing node modules (package.json)
       npm ERR! code ERESOLVE
       npm ERR! ERESOLVE unable to resolve dependency tree
       npm ERR! 
       npm ERR! While resolving: [email protected]
       npm ERR! Found: [email protected]
       npm ERR! node_modules/react
       npm ERR!   react@"^17.0.2" from the root project
       npm ERR! 
       npm ERR! Could not resolve dependency:
       npm ERR! peer react@"^16.8.0" from [email protected]
       npm ERR! node_modules/hookrouter
       npm ERR!   hookrouter@"^1.2.5" 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.m9lNd/eresolve-report.txt for a full report.
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.m9lNd/_logs/2022-02-04T21_16_14_755Z-debug.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 React.js (create-react-app) multi app.
 !     Push failed

Any idea what would have caused this? I'm using the latest hookrouter version and React version "^17.0.2"

seanbelverstone avatar Feb 04 '22 21:02 seanbelverstone

I think you require React 17.x for your app while hookrouter is built for react 16. Therefore you have a dependency conflict.

Paratron avatar Feb 04 '22 22:02 Paratron