-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
fix: browser selection via env variable #11878
base: main
Are you sure you want to change the base?
Conversation
Hi @FloydJohn! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
This Process still not working. |
HI @4nkit-5hukla, thanks for the feedback! I tested this fix again, and I can confirm that I'll leave here the steps to test this fix:
Firefox should open as expected. To make sure that you created the Hope that this helped, let me know if it works as expected! |
After having this problem myself, I did some debugging and came to the same conclusion. I was going to create a pull request myself, but @FloydJohn beat me to it. I can confirm that this fix solves the problem. (Another fix would be to revert to open@7.4.2.) |
I can confirm that this fixes #11917. |
@@ -120,8 +120,6 @@ function startBrowserProcess(browser, url, args) { | |||
try { | |||
var options = { | |||
app: { name: browser, arguments: args }, | |||
wait: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to delete the wait
property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I noticed the default is set to false, as described here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
TIP: For now, this works as a temporary fix in
|
Is there an update on merging this PR? |
When this PR will be merge ? |
Could this be merged? Its a very annoying issue. |
Up |
This workaround didn't work with npm for me. Instead I've used the following (requires npm-cli 8.3 or later):
I had to also remove |
It would be nice to merge this PR. |
hi, why is this still not merged? |
merge asap wtf ffs. what r u waiting for ? :D |
look at when the last version was released: https://www.npmjs.com/package/create-react-app |
whats ur choice bro? |
for one existing project based on CRA i've switched to vite, so far better. but im not that experienced with these tools so can only recommend it based on how the project is active |
Goodnight. Any updates on this pull request? |
????????? cra dead or what ? |
Good night. Some people say "yes" and use Vite as an alternative tool.... |
Hi everyone,
this PR fixes the opening of a browser of choice, selected through the
BROWSER
environment variable, when starting a generated project.After migrating to CRA v5.x the feature stopped working (see #11873, #11844, #11942, #11917, #12275).
Browsing the documentation for the
open@8.4.0
package (available here) I noticed that the syntax for opening an URL using a specified browser was updated.This PR includes two small changes:
open
package natively supports passing an array of arguments to the application, we no longer need to concatenate the arguments before the callTo test this feature I followed this test plan:
.env
file in the template project, containing for example the valueBROWSER=google-chrome-stable
. The browser name could change based on OS or linux distro.npm run start
. A new tab should open in the specified browser..env
file.npm run start
: it should open on the default browser.