question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[now-cli] upgrading to 16.3.0 breaks the routes

See original GitHub issue

Summary

I’m hosting a static build of my CRA bootstrapped app to Zeit. After upgrading to 16.3.0, my route redirection to root file stopped working. I was using now.json.routes to redirect all my dynamic routes to index.html file for frontend route handling. I am getting 404 errors while accessing routes other than index. Reverting back to 16.2.0 seams to fix this issue.

My now.json file

{
  "name": "app-name",
  "routes": [
    { "src": "/static/(.*)", "dest": "/static/$1" },
    { "src": "/(.*\\.(js|json|png|jpg|ico|txt))", "dest": "/$1" },
    { "src": "/(.*)", "dest": "/" }
  ]
}

Steps to reproduce

Any SPA which is statically hosted with above routes configuration should reproduce the issue when deployed with now-cli@16.3.0.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sudkumarcommented, Oct 3, 2019

@styfle Awesome. It’s working

$ now --version
16.1.4-canary.14
1reaction
styflecommented, Oct 3, 2019

@sudkumar Thanks! I released another canary with a fix. npm i -g now@canary

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing Now CLI failed (Now Experience UI Framework)
I am trying to install Now CLI using this command: ... Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.13:...
Read more >
16.3.1 Packet Tracer - Troubleshoot Static and Default Routes
16.3.1 Packet Tracer - Troubleshoot Static and Default RoutesCCNAv7 - Switching, Routing, and Wireless EssentialsVisit our Website to ...
Read more >
Changelog - hapi.dev
Route validation should throw AssertionError. 18.0.0 · Release Notes additional information. breaking changes. #3908. Update hapijs/vise to 3.0.2 from 3.0.1.
Read more >
Migrating Breaking Changes in SvelteKit - Netlify
Update dependencies through your package manager. npm i # or yarn or pnpm. Run the migration command. The routes will be renamed and...
Read more >
BC Break in symfony/routing 4.4.0 · Issue #34612 - GitHub
Today I tried to composer update our application dependencies in a released version of our software. The update brought in the 4.4 version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found