Tuesday, 4 April 2017

Heroku push rejected after adding disableBasicChallenge to Passport in Node.js

On my app, I was getting that annoying authentication pop-up whenever you incorrectly input that wrong login credentials. I researched and found that to remove it, you must add in disableBasicChallenge into any new BasicStrategy, like so...

var strategy = new BasicStrategy({ disableBasicChallenge: true },function(username, password, callback)

After I pushed these changes to Github, my Heroku build logs notified me of the following:

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`

I tried to revert back to the previous build before adding in the disableBasicCahllenge and I get the same result. Keep in mind, the deploy was working fine before I added this bit of code.

I've researched other questions that are similar. Some seem to suggest that including your node modules is necessary, but that clashes with the fact that my previous build worked without adding them as well as without specifying my current node version. These warnings seem irrelevent to the real issue.

Anyone else experienced a similar issue?



via Colin Aulds

No comments:

Post a Comment