Skip to content

Commit 68dc7e8

Browse files
committed
warn if cannot find matching version for a library
1 parent 708dde9 commit 68dc7e8

File tree

4 files changed

+190
-1055
lines changed

4 files changed

+190
-1055
lines changed

Diff for: packages/cli-tools/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"access": "public"
88
},
99
"dependencies": {
10-
"@react-native-community/cli-doctor": "12.0.0-alpha.7",
10+
"@react-native-community/cli-doctor": "12.0.0-alpha.11",
1111
"appdirsjs": "^1.2.4",
1212
"chalk": "^4.1.2",
1313
"find-up": "^5.0.0",

Diff for: packages/cli-tools/src/resolveTransitiveDeps.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,16 @@ async function getPackagesVersion(
306306
ranges,
307307
availableVersions,
308308
);
309-
workingVersions[packageName] = workingVersion;
309+
310+
if (workingVersion !== null) {
311+
workingVersions[packageName] = workingVersion;
312+
} else {
313+
logger.warn(
314+
`Could not find a version that matches all ranges for ${chalk.bold(
315+
packageName,
316+
)}. Please resolve this issue manually.`,
317+
);
318+
}
310319
}
311320

312321
return workingVersions;

Diff for: packages/cli/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const handleError = (err: Error) => {
4141
}
4242
process.exit(1);
4343
};
44+
4445
function printExamples(examples: Command['examples']) {
4546
let output: string[] = [];
4647

@@ -172,7 +173,6 @@ async function setupAndRun() {
172173
}
173174

174175
let config: Config | undefined;
175-
176176
try {
177177
config = loadConfig();
178178

0 commit comments

Comments
 (0)