@@ -72,7 +72,7 @@ function verifyPackageTree() {
72
72
if ( depPackageJson . version !== expectedVersion ) {
73
73
console . error (
74
74
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` +
76
76
`It is likely ${ chalk . bold (
77
77
'not'
78
78
) } a bug in Create React App, but something you need to fix locally.\n\n`
@@ -83,14 +83,15 @@ function verifyPackageTree() {
83
83
chalk . green (
84
84
` "${ chalk . bold ( dep ) } ": "${ chalk . bold ( expectedVersion ) } "\n\n`
85
85
) +
86
+ `Don't try to install it manually: your package manager does it automatically.\n` +
86
87
`However, a different version of ${ chalk . bold (
87
88
dep
88
89
) } was detected higher up in the tree:\n\n` +
89
90
` ${ chalk . bold ( chalk . red ( maybeDep ) ) } (version: ${ chalk . bold (
90
91
chalk . red ( depPackageJson . version )
91
92
) } ) \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` +
94
95
` ${ chalk . cyan ( '1.' ) } Delete ${ chalk . bold (
95
96
'package-lock.json'
96
97
) } (${ chalk . underline ( 'not' ) } ${ chalk . bold (
@@ -113,7 +114,8 @@ function verifyPackageTree() {
113
114
) } or ${ chalk . bold (
114
115
'yarn'
115
116
) } , 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` +
117
119
` ${ chalk . cyan ( '5.' ) } If you used ${ chalk . bold (
118
120
'npm'
119
121
) } , install ${ chalk . bold (
@@ -123,7 +125,7 @@ function verifyPackageTree() {
123
125
` ${ chalk . cyan ( '6.' ) } Check if ${ chalk . bold (
124
126
maybeDep
125
127
) } 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` +
127
129
` ${ chalk . cyan ( '7.' ) } Try running ${ chalk . bold (
128
130
`npm ls ${ dep } `
129
131
) } in your project folder.\n` +
@@ -135,7 +137,7 @@ function verifyPackageTree() {
135
137
`If nothing else helps, add ${ chalk . bold (
136
138
'SKIP_PREFLIGHT_CHECK=true'
137
139
) } 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` +
139
141
chalk . cyan (
140
142
`P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!\n`
141
143
)
0 commit comments