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.

How to disable `homepage` in dev mode?

See original GitHub issue

Describe the bug

I just created an app with CRA. The deployment base url is in a subfolder (https://a.com/webapp) but I want it to be / in dev mode. Now it will start at http://localhost:3000/handoff in dev mode, so how can I disable it and make it in http://localhost:3000?

Did you try recovering your dependencies?

yes. I just created an new project to reproduce it.

Which terms did you search for in User Guide?

homepage dev

Environment

current version of create-react-app: 4.0.3
  running from /Users/80323181/.config/yarn/global/node_modules/create-react-app

  System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 14.15.2 - /usr/local/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 7.5.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 89.0.4389.90
    Edge: 88.0.705.74
    Firefox: Not Found
    Safari: 14.0.3
  npmPackages:
    react: ^17.0.1 => 17.0.1
    react-dom: ^17.0.1 => 17.0.1
    react-scripts: 4.0.3 => 4.0.3
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. yarn create react-app my-app
  2. add below to package.json
"homepage": "http://abc.com/handoff",
  1. yarn start
  2. It will be served at /handoff image

Expected behavior

Should be served at /

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
leadreamcommented, Apr 27, 2021

@cmacdonnacha add .env file and write PUBLIC_URL in it

PUBLIC_URL=./
1reaction
leadreamcommented, Mar 22, 2021

@petetnt Thanks. For now I’m doing as this way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Disable and Remove Developer Mode Extensions in ...
At the above screen, click on the Disable button to disable, but not remove, the developer mode extensions.
Read more >
How to Turn Off Chromebook Developer Mode - YouTube
How to turn off developer mode on your Chromebook? In this tutorial, I show you how to disable developer mode on your Chromebook....
Read more >
How to disable browser developer tools? - Stack Overflow
You can not block developer tools, but you can try to stop the user to enter them. You can try ...
Read more >
Enabling Developer Mode on a device
If you want to disable Developer Mode, you do so directly on the device. Go to Settings > Privacy & Security > Developer...
Read more >
One of my pages is stuck in Development mode. How do I ...
It looks like there was a technical problem. Here's what you can do: Refresh the page. Check your internet connection. Open the site...
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