Skip to content

Commit e70e64e

Browse files
committed
Slightly tweak the wording
1 parent 34ee0de commit e70e64e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/react-scripts/scripts/utils/verifyPackageTree.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function verifyPackageTree() {
7272
if (depPackageJson.version !== expectedVersion) {
7373
console.error(
7474
chalk.red(
75-
`There might be a problem with the project dependency tree.\n` +
75+
`\nThere might be a problem with the project dependency tree.\n` +
7676
`It is likely ${chalk.bold(
7777
'not'
7878
)} a bug in Create React App, but something you need to fix locally.\n\n`
@@ -83,14 +83,15 @@ function verifyPackageTree() {
8383
chalk.green(
8484
` "${chalk.bold(dep)}": "${chalk.bold(expectedVersion)}"\n\n`
8585
) +
86+
`Don't try to install it manually: your package manager does it automatically.\n` +
8687
`However, a different version of ${chalk.bold(
8788
dep
8889
)} was detected higher up in the tree:\n\n` +
8990
` ${chalk.bold(chalk.red(maybeDep))} (version: ${chalk.bold(
9091
chalk.red(depPackageJson.version)
9192
)}) \n\n` +
92-
`This is known to cause hard-to-debug issues.\n` +
93-
`Try following these steps:\n\n` +
93+
`Manually installing incompatible versions is known to cause hard-to-debug issues.\n` +
94+
`To fix the dependency tree, try following the steps below in the exact order:\n\n` +
9495
` ${chalk.cyan('1.')} Delete ${chalk.bold(
9596
'package-lock.json'
9697
)} (${chalk.underline('not')} ${chalk.bold(
@@ -113,7 +114,8 @@ function verifyPackageTree() {
113114
)} or ${chalk.bold(
114115
'yarn'
115116
)}, depending on the package manager you use.\n\n` +
116-
`If this has not helped, there are a few other things to try:\n\n` +
117+
`In most cases, this should be enough to fix the problem.\n` +
118+
`If this has not helped, there are a few other things you can try:\n\n` +
117119
` ${chalk.cyan('5.')} If you used ${chalk.bold(
118120
'npm'
119121
)}, install ${chalk.bold(
@@ -123,7 +125,7 @@ function verifyPackageTree() {
123125
` ${chalk.cyan('6.')} Check if ${chalk.bold(
124126
maybeDep
125127
)} is outside your project directory.\n` +
126-
` For example, you might have installed something accidentally in your home folder.\n\n` +
128+
` For example, you might have accidentally installed something in your home folder.\n\n` +
127129
` ${chalk.cyan('7.')} Try running ${chalk.bold(
128130
`npm ls ${dep}`
129131
)} in your project folder.\n` +
@@ -135,7 +137,7 @@ function verifyPackageTree() {
135137
`If nothing else helps, add ${chalk.bold(
136138
'SKIP_PREFLIGHT_CHECK=true'
137139
)} to an ${chalk.bold('.env')} file in your project.\n` +
138-
`This permanently disables this preflight check in case you want to proceed anyway.\n\n` +
140+
`That would permanently disable this preflight check in case you want to proceed anyway.\n\n` +
139141
chalk.cyan(
140142
`P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!\n`
141143
)

0 commit comments

Comments
 (0)