diff --git a/packages/expo/src/executors/build/build.impl.ts b/packages/expo/src/executors/build/build.impl.ts index 0c57b34f7e101..314969873d232 100644 --- a/packages/expo/src/executors/build/build.impl.ts +++ b/packages/expo/src/executors/build/build.impl.ts @@ -114,7 +114,7 @@ function copyPackageJsonAndLock( packageManager: PackageManager, workspaceRoot: string, projectRoot: string -) { +): () => void { const packageJson = pathResolve(workspaceRoot, 'package.json'); const rootPackageJson = readJsonFile(packageJson); // do not copy package.json and lock file if workspaces are enabled @@ -123,7 +123,8 @@ function copyPackageJsonAndLock( existsSync(pathResolve(workspaceRoot, 'pnpm-workspace.yaml'))) || rootPackageJson.workspaces ) { - return; + // no resource taken, no resource cleaned up + return () => {}; } const packageJsonProject = pathResolve(projectRoot, 'package.json');