-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
BROWSER=none not working - react-dev-utils package from npm not up-to-date with git? #1494
Comments
The change was done in master but 0.9.0 has not been released yet. It will be released soon. |
0.9.0 is out now with support for this. |
upgraded to 0.9.0, which resolved this issue :). Thanks a lot 👍 |
Sorry, maybe I'm stupid but how were you able to update? I'm using |
0.9.0 refers to the version of |
Okay, than the information in CHANGELOG are very confusing. 🙈 https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#094-march-6-2017 It's saying that the version Than again I'm looking for changes from the PR #1546 which were merged on 15th of February. 15th of February vs. 9th of March, but not part of the package? Looking into the So apart from all this I'm also confused by the fact that older changes than the latest ones are not part of the latest version of the package. 🙈 😅 |
Ah, now looking at #1546 a little closer I see that it changes are scheduled for 0.10.x by @gaearon. So you seem to cherry-pick changes from the current master? Also, why is this scheduled for the next minor version? Worried about anything? Apart from changes in a |
Changelog uses versions of #1546 only works with Webpack 2 (afaik). So it's not released until we release a version of react-scripts compatible with Webpack 2. Yea, we cherry-pick stable branch from master now but the next release will be done from master. |
Thank you for the explanations. I found and started to use the |
Can you reproduce the problem with latest npm?
yes
Description
I wanted to use the
BROWSER=none
option, to prevent react-scripts from opening a new Browser.Setting the env variable did not work at all.
after checking the
openBrowser.js
file innode_modules/react-dev-utils/
I realized, that it is differentfrom the
openBrowser.js
in the github repo:/**
*/
var execSync = require('child_process').execSync;
var opn = require('opn');
function openBrowser(url) {
if (process.platform === 'darwin') {
try {
// Try our best to reuse existing tab
// on OS X Google Chrome with AppleScript
execSync('ps cax | grep "Google Chrome"');
execSync(
'osascript openChrome.applescript ' + url,
{cwd: __dirname, stdio: 'ignore'}
);
return true;
} catch (err) {
// Ignore errors.
}
}
// Fallback to opn
// (It will always open new tab)
try {
opn(url).catch(() => {}); // Prevent
unhandledRejection
error.return true;
} catch (err) {
return false;
}
}
This file does not contain the check for
BROWSER=none
, but inhttps://github.com/facebookincubator/create-react-app/blob/master/packages/react-dev-utils/openBrowser.js
it exists.
Expected behavior
using the env variable like
BROWSER=none
should prevent react-scripts from opening the browserActual behavior
When using
BROWSER=none
, the Browser still opensEnvironment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):wine-page@0.1.0 /home/beac0n/dev/wine-page
└── react-scripts@0.8.5
node -v
: v7.5.0npm -v
: 4.1.2Operating system:
Arch Linux
I could reproduce the issue when creating a new project with create-react-app 1.0.3.
I also ran
npm cache clean
,yarn cache clean
- both commands with sudo and without.I also downloaded the bundle manually from the npm registry:
https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-0.4.2.tgz
The
openBrowser.js
file still isn't the same as in the github repository.The text was updated successfully, but these errors were encountered: