e2e-test: fix crash when app has no devDependencies
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -344,7 +344,9 @@ async function overrideModuleResolutions(appDir: string, workspaceDir: string) {
|
||||
|
||||
pkgJson.dependencies[name] = `file:${pkgPath}`;
|
||||
pkgJson.resolutions[name] = `file:${pkgPath}`;
|
||||
delete pkgJson.devDependencies[name];
|
||||
if (pkgJson.devDependencies) {
|
||||
delete pkgJson.devDependencies[name];
|
||||
}
|
||||
}
|
||||
}
|
||||
fs.writeJson(pkgJsonPath, pkgJson, { spaces: 2 });
|
||||
|
||||
Reference in New Issue
Block a user