-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Upgrading react-scripts from 3.2.0 to 3.4.0 will cause routing URL behave differently when "homepage" is set in Dev mode #8519
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
Comments
This change was made on purpose. You can check details here: #7259 So probably you will need to change your config. The change broke my setup too. For me setting PUBLIC_URL by hand in dev and during the build make the job. |
@jamesplease Thanks for explaining this issue in detail, really appreciate! In my cases we only use My observation is that with while in |
Summary: Loading dagit would cause the following error: ``` The "path" argument must be of type string. Received undefined ``` This was an issue in `react-scripts`. Upgrading to 3.4.0 resolves the error Context: facebook/create-react-app#8490 facebook/create-react-app#8519 Test Plan: `yarn install`, run dagit Reviewers: prha, alangenfeld, catherinewu, schrockn Reviewed By: prha, schrockn Subscribers: schrockn Differential Revision: https://dagster.phacility.com/D2111
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
Describe the bug
Upgrading react-scripts from 3.2.0 to 3.4.0 will cause routing URL behave differently when "homepage" is set in Dev mode.
With
hompage:"/my/dir"
set in mypackage.json
and using React router component<Link to="/about">About</Link>
to do the routing, different version will have different behavior on the url generated in<a href="xxx">
:v3.2.0
-><a href="https://github.com/about">
v3.4.0
-><a href="https://github.com/my/dir/about">
But it seems to be only affecting dev version of the application, production build is always pointing to
<a href="https://github.com/my/dir/about">
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
homepage, react-scripts, 3.4.0, change log
Environment
(paste the output of the command here.)
Steps to reproduce
(Write your steps here:)
homepage:"/my/dir"
inpackage.json
<Link to="/about">About</Link>
from react-router to the projectnpm start
v3.2.0
-><a href="https://github.com/about">
v3.4.0
-><a href="https://github.com/my/dir/about">
Expected behavior
Should behave the same as the previous version.
Actual behavior
Inspect this element in browser, it will have different href in different react-scripts version
v3.2.0
-><a href="https://github.com/about">
v3.4.0
-><a href="https://github.com/my/dir/about">
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered: