0
votes

I'm trying to deploy a react app I worked on and when I try to push to heroku master it says "failed to compile node.js". Now I've already tried to specify what node I'm using by following the steps, but still getting an error.

Here is what I'm getting in the terminal:

Creating an optimized production build... remote: Failed to compile. remote:
remote: ./src/pages/Home/Home.js remote: Cannot find file '../../Components/Intro' in './src/pages/Home'. remote:
remote:
remote: npm ERR! code ELIFECYCLE remote: npm ERR! errno 1 remote: npm ERR! client@0.1.0 build: react-scripts build remote: npm ERR! Exit status 1 remote: npm ERR! remote: npm ERR! Failed at the client@0.1.0 build script. remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. remote: remote: npm ERR! A complete log of this run can be found in: remote: npm ERR! /tmp/npmcache.g54nm/_logs/2020-05-21T03_01_57_080Z-debug.log remote: npm ERR! code ELIFECYCLE remote: npm ERR! errno 1 remote: npm ERR! kyndco-app@1.0.0 build: cd client && npm run build remote: npm ERR! Exit status 1 remote: npm ERR! remote: npm ERR! Failed at the kyndco-app@1.0.0 build script. remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. remote: remote: npm ERR! A complete log of this run can be found in: remote: npm ERR! /tmp/npmcache.g54nm/_logs/2020-05-21T03_01_57_461Z-debug.log remote: npm ERR! code ELIFECYCLE remote: npm ERR! errno 1 remote: npm ERR! kyndco-app@1.0.0 heroku-postbuild: npm run build remote: npm ERR! Exit status 1 remote: npm ERR! remote: npm ERR! Failed at the kyndco-app@1.0.0 heroku-postbuild script. remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. remote: remote: npm ERR! A complete log of this run can be found in: remote: npm ERR! /tmp/npmcache.g54nm/_logs/2020-05-21T03_01_57_568Z-debug.log remote: remote: -----> Build failed remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here: remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys

2

2 Answers

0
votes

It might have to do with .gitignore file. Make sure /Componentes/Intro is not added in .gitignore file