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

bug: homepage in package.json breaks react-create-app if it contains a fragment identifier (#foo) #8531

Closed
michaelmcmillan opened this issue Feb 21, 2020 · 3 comments

Comments

@michaelmcmillan
Copy link

Describe the bug

This is a subtle bug which causes create-react-app to strip a character from the homepage URL and then crash. It was discovered by @cyrille-arundo, @geevb and myself.

Did you try recovering your dependencies?

Yes.

Which terms did you search for in User Guide?

Irrelevant.

Environment

Environment Info:

  current version of create-react-app: 3.4.0
  running from /Users/michaelmcmillan/.npm/_npx/14940/lib/node_modules/create-react-app

  System:
    OS: macOS 10.15.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 12.13.1 - /usr/local/bin/node
    Yarn: 1.21.0 - /usr/local/bin/yarn
    npm: 6.12.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 79.0.3945.130
    Firefox: 71.0
    Safari: 13.0.3
  npmPackages:
    react: ^16.12.0 => 16.12.0
    react-dom: ^16.12.0 => 16.12.0
    react-scripts: 3.4.0 => 3.4.0
  npmGlobalPackages:
    create-react-app: Not Found

(paste the output of the command here.)

Steps to reproduce

  1. npx create-react-app my-app
  2. Add a URL with a fragment identifier to package.json's homepage: https://domain.com/page#hello"
  3. Run npm start
  4. Watch it blow up in all its glory.

Expected behavior

It should work.

Actual behavior

It blows up.

Compiled successfully!

You can now view my-app in the browser.

  Local:            http://localhost:3000/pag
  On Your Network:  http://10.10.10.86:3000/pag

Note that the development build is not optimized.
To create a production build, use yarn build.

URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'
    at decodeURIComponent (<anonymous>)
    at decode_param (/Users/michaelmcmillan/reproduce/my-app/node_modules/express/lib/router/layer.js:172:12)
[...]

Reproducible demo

Check this pull request #8514

@stale
Copy link

stale bot commented Mar 22, 2020

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.

@stale stale bot added the stale label Mar 22, 2020
@stale
Copy link

stale bot commented Mar 27, 2020

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.

@stale stale bot closed this as completed Mar 27, 2020
@daniel-karl
Copy link

this is not fixed

@lock lock bot locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants