Skip to content

Commit e188e1e

Browse files
Remove yarn < 1.5 workaround.
1 parent 40bb89c commit e188e1e

File tree

1 file changed

+1
-10
lines changed
  • packages/react-scripts/scripts

1 file changed

+1
-10
lines changed

packages/react-scripts/scripts/init.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const { defaultBrowsers } = require('react-dev-utils/browsersHelper');
2323
const os = require('os');
2424
const resolveFrom = require('resolve-from');
2525
const paths = require('../config/paths');
26-
const { findMonorepo } = require('react-dev-utils/workspaceUtils');
2726

2827
function isInGitRepository() {
2928
try {
@@ -178,18 +177,10 @@ module.exports = function(
178177
fs.unlinkSync(templateDependenciesPath);
179178
}
180179

181-
// yarn ws bug not creating app/node_modules/.bin link to hoisted react-scripts
182-
// -- workaround: install react-scripts again to create link
183-
// bug in yarn 1.3.2, fixed in nightly 1.4.1-20180211.2236
184-
const rerunYarn = useYarn && findMonorepo(appPath).isAppIncluded;
185-
if (rerunYarn) {
186-
console.log('Detected app in yarn workspace, running install again');
187-
}
188-
189180
// Install react and react-dom for backward compatibility with old CRA cli
190181
// which doesn't install react and react-dom along with react-scripts
191182
// or template is presetend (via --internal-testing-template)
192-
if (!isReactInstalled(appPackage) || template || rerunYarn) {
183+
if (!isReactInstalled(appPackage) || template) {
193184
console.log(`Installing react and react-dom using ${command}...`);
194185
console.log();
195186

0 commit comments

Comments
 (0)