diff --git a/packages/workspace/src/core/nx-deps/nx-deps-cache.ts b/packages/workspace/src/core/nx-deps/nx-deps-cache.ts index 02047d7e57..af823af5fe 100644 --- a/packages/workspace/src/core/nx-deps/nx-deps-cache.ts +++ b/packages/workspace/src/core/nx-deps/nx-deps-cache.ts @@ -83,7 +83,7 @@ export function readCache(): false | ProjectGraphCache { export function writeCache( packageJsonDeps: Record, nxJson: NxJsonConfiguration, - tsConfig: { compilerOptions: { paths: { [k: string]: any } } }, + tsConfig: { compilerOptions: { paths?: { [k: string]: any } } }, projectGraph: ProjectGraph ): void { performance.mark('write cache:start'); @@ -94,7 +94,7 @@ export function writeCache( const newValue: ProjectGraphCache = { version: '3.0', deps: packageJsonDeps, - pathMappings: tsConfig.compilerOptions.paths, + pathMappings: tsConfig.compilerOptions.paths || {}, nxJsonPlugins, nodes: projectGraph.nodes, dependencies: projectGraph.dependencies,