D
D
Denis2021-03-10 15:11:02
npm
Denis, 2021-03-10 15:11:02

Laravel deploy to heroku not working?

I can't deploy to heroku after I set up auth in the project. Before that, the deployment worked perfectly for this particular application. Now an error and rolls back to the last successful deployment. I don't understand why? Locally everything works fine.

$ git push heroku main
Enumerating objects: 478, done.    
Counting objects: 100% (478/478), done.
Delta compression using up to 4 threads
Compressing objects: 100% (397/397), done.
Writing objects: 100% (443/443), 832.70 KiB | 17.35 MiB/s, done.
Total 443 (delta 295), reused 57 (delta 33)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote:        NPM_CONFIG_PRODUCTION=false
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NODE_VERBOSE=false
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote:        engines.node (package.json):  12.18.2
remote:        engines.npm (package.json):   unspecified (use default)
remote:
remote:        Resolving node version 12.18.2...
remote:        Downloading and installing node 12.18.2...
remote:        Using default npm version: 6.14.5
remote:        
remote: -----> Restoring cache
remote:        Cached directories were not restored due to a change in version of node, npm, yarn or stack
remote:        Module installation may take longer for this build
remote:        
remote: -----> Installing dependencies
remote:        Installing node modules
remote:        
remote:        > [email protected] install /tmp/build_1bdae932/node_modules/fsevents
remote:        > node install.js
remote:
remote:        
remote:        Skipping 'fsevents' build as platform linux is not supported
remote:        npm ERR! Cannot read property 'length' of undefined
remote:        
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /tmp/npmcache.DLxI2/_logs/2021-03-10T11_30_31_452Z-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
remote:
remote:        If you're stuck, please submit a ticket so we can help:
remote:        https://help.heroku.com/
remote:
remote:        Love,
remote:        Heroku
remote:
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: 06dd5ac1fbb899bc5ed64f41c5e225221ce6b02a
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version 06dd5ac1fbb899bc5ed64f41c5e225221ce6b02a
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote: 
remote: !       Push rejected to drumsid-php-project-lvl4.
remote:
To https://git.heroku.com/drumsid-php-project-lvl4.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/drumsid-php-project-lvl4.git'

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question