Skip to content

Commit

Permalink
fix(core): ensure cache pathMappings always exist
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry authored and vsavkin committed Jul 23, 2021
1 parent a9afb97 commit fedcfc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/workspace/src/core/nx-deps/nx-deps-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function readCache(): false | ProjectGraphCache {
export function writeCache(
packageJsonDeps: Record<string, string>,
nxJson: NxJsonConfiguration,
tsConfig: { compilerOptions: { paths: { [k: string]: any } } },
tsConfig: { compilerOptions: { paths?: { [k: string]: any } } },
projectGraph: ProjectGraph
): void {
performance.mark('write cache:start');
Expand All @@ -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,
Expand Down

0 comments on commit fedcfc4

Please sign in to comment.