Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
Vue app not working once building for production

I have a Vue.js application that I am trying to mock build for production so that I can test registering of a service worker to get it so I can send notifications (useful for the app not a spam one like some sites). The issue I am having is that when I build for production I try to login in a fresh incognito browser and I can log in but when my auth provider (Auth0) redirects back to my backend it fails on the callback saying it doesn't exist. However, if I use the same .env file when running npm run serve I can log in and have the callback URL work.

Process I am using

  • Run npm run buildProd runs the commands vue-cli-service build --mode production
  • Run http-server dist/
  • Go to / which redirects to /login
  • Log in via Auth0
  • Redirect to /callback
  • Error with 404 on redirect

Error message from http-server

"GET /callback?code=dcdc1EAzh2Vx0_cN&state=bkFzRWtoUnd5WGJfcGw1d0tuNU1Md0lILmFWTEhxcmZKY0IuQ0NrRE9lVA%3D%3D" Error (404): "Not found"

I am looking to see if anyone knows why this might be happening? I have not tried a full production deploy to the production infrastructure yet as I don't want to break it.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It turns out I was not running Vue and serving the file in a supported format. I ended up creating a simple HTTP server using Node.js and serving the index.html file and it got rid of the error but introduced a new one I plan to ask about soon

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!