Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect() for freshly installed grunge stack redirects to <uri>,%20<uri> #190

Open
purphoros opened this issue Sep 13, 2024 · 2 comments
Open

Comments

@purphoros
Copy link

purphoros commented Sep 13, 2024

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

$ npx create-remix@latest --template remix-run/grunge-stack

   remix   v2.12.0 💿 Let's build a better website...

   dir   Where should we create your new project?
         ./grunge-stack

      ◼  Template: Using remix-run/grunge-stack...
      ✔  Template copied

   git   Initialize a new git repository?
         Yes

  deps   Install dependencies with npm?
         Yes

  init   This template has a remix.init script. Do you want to run it?
         Yes

      ✔  Dependencies installed

      ✔  Git initialized
      ✔  Dependencies for remix.init script installed

      ◼  Running template's remix.init script... 

$ cd ./grunge-stack
$ mv .env.example .env
$ npm run dev

Sign Up will redirect to http://localhost:3333/,%20/
Log In will redirect to http://localhost:3333/notes,%20/notes

I can replicate this in both Windows (Git Bash) and macOS (Silicon).

Using the existing version template npx [email protected] --template remix-run/grunge-stack results in the same issue, as it upgrades all the dependencies to 2.12.0 and beyond.

In this scenario, I manually changed the package.json file versions from ^2.11.0 to 2.11.0 and installed via npm install --legacy-peer-deps, but the result was the same, even though the lock file still contains Remix 2.11.0 dependencies and an older version of @remix-run/router (1.19.0).

I tried with Node 18 and 20.

So, I’m not entirely sure of the root cause.

This is only a local development issue; I deployed to staging, and it’s not an issue there. However, I’ve refrained from deploying to production.

Expected Behavior

Sign Up will redirect to http://localhost:3333/
Log In will redirect to http://localhost:3333/notes

Actual Behavior

Sign Up will redirect to http://localhost:3333/,%20/
Log In will redirect to http://localhost:3333/notes,%20/notes

@purphoros purphoros changed the title redirect() for existing and freshly installed grunge stack redirects to <uri>,%20<uri> redirect() for freshly installed grunge stack redirects to <uri>,%20<uri> Sep 13, 2024
@MosheStauber
Copy link

same here, did you find anything?

@purphoros
Copy link
Author

same here, did you find anything?

I'm not sure which dependency is the root cause. I spent a lot of time troubleshooting and once I verified that it wasn't affecting deployments I decided to just work around it (work deadlines).

If you run your build locally npm run build and start in arc sandbox with npm run start the issue will not occur.

It only occurs when running arc sandbox from remix dev, so some dependency between the 2 is conflicting.

I've since done production deployments without any issues.

I'll look more into it when I get some free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants