698 viewsMern Amazona
0 Comments

Hi Basir

Thank you for the tutorial of amazona.

I followed your instruction well but stocked when I tried to build the app in heroku.

The error code are below. I tried to find solutions for that but can’t find any good one.

Could you help me?

Thank you.

Jimmy

[apcode language=”jscript”]

-----> Building on the Heroku-22 stack
-----> Using buildpacks:
       1. heroku/nodejs
       2. heroku/ruby
-----> Node.js app detected
        -----> Creating runtime environment
               NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
        -----> Installing binaries
       engines.node (package.json):  18.7.0
       engines.npm (package.json):   8.19.1
               Resolving node version 18.7.0...
       Downloading and installing node 18.7.0...
       Bootstrapping npm 8.19.1 (replacing 8.15.0)...
       npm 8.19.1 installed
        -----> Installing dependencies
       Installing node modules
               added 49 packages, and audited 50 packages in 998ms
               5 packages are looking for funding
         run `npm fund` for details
               found 0 vulnerabilities
        -----> Build
       Detected both "build" and "heroku-postbuild" scripts
       Running heroku-postbuild
               > [email protected] heroku-postbuild
       > npm run build
                       > [email protected] build
       > cd backend && npm install  && cd ../frontend && npm install && npm run build
                       added 169 packages, and audited 170 packages in 3s
               7 packages are looking for funding
         run `npm fund` for details
               4 high severity vulnerabilities
               To address issues that do not require attention, run:
         npm audit fix
               To address all issues (including breaking changes), run:
         npm audit fix --force
               Run `npm audit` for details.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR!   peer react@">=16.3.0" from @paypal/[email protected]
npm ERR!   node_modules/@paypal/react-paypal-js
npm ERR!     @paypal/react-paypal-js@"^7.8.2" from the root project
npm ERR!   15 more (@react-aria/ssr, @restart/hooks, @restart/ui, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8" from [email protected]
npm ERR! node_modules/use-reducer-logger
npm ERR!   use-reducer-logger@"^1.0.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^16.8" from [email protected]
npm ERR!   node_modules/use-reducer-logger
npm ERR!     use-reducer-logger@"^1.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.zTrPW/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npmcache.zTrPW/_logs/2022-12-23T06_08_57_169Z-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
               If you're stuck, please submit a ticket so we can help:
       https://help.heroku.com/
               Love,
       Heroku
         !     Push rejected, failed to compile Node.js app.
 !     Push failed

[/apcode]

Bassir Changed status to publish November 26, 2023

Hello Jimmy,

As far I know Heroku is paid now, If you want you can use Render for server side deployment . you can also follow the this link to learn how to deploy server side using Render – https://www.loom.com/share/7dd26ca96c9942ee92b7585614d19835 , I think it will help you.

Best,

Fajla Rabby Khan