We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c670e7f commit b8fbadaCopy full SHA for b8fbada
src/compiler/moduleNameResolver.ts
@@ -290,7 +290,9 @@ namespace ts {
290
const pnpapi = getPnpApi();
291
292
const currentPackage = pnpapi.findPackageLocator(`${currentDirectory}/`);
293
- Debug.assert(!!currentPackage);
+ if (!currentPackage) {
294
+ return [];
295
+ }
296
297
const {packageDependencies} = pnpapi.getPackageInformation(currentPackage!);
298
@@ -1645,8 +1647,9 @@ namespace ts {
1645
1647
1646
1648
function checkPnpExternalLibraryImport(resolvedValue: Resolved) {
1649
const pnpApi = getPnpApi();
-
1650
const ownerPackage = pnpApi.findPackageLocator(resolvedValue.path);
1651
+
1652
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
1653
Debug.assert(!!ownerPackage);
1654
1655
const rootLocators = pnpApi.getDependencyTreeRoots();
0 commit comments