@everystack/cli 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli/commands/update.ts +11 -2
package/package.json
CHANGED
|
@@ -412,8 +412,17 @@ async function loadAppConfig(): Promise<any> {
|
|
|
412
412
|
// Handle Expo's function export pattern: export default () => ({ ... })
|
|
413
413
|
if (typeof resolved === 'function') resolved = resolved();
|
|
414
414
|
return resolved.expo || resolved;
|
|
415
|
-
} catch {
|
|
416
|
-
|
|
415
|
+
} catch (e) {
|
|
416
|
+
const configPath = path.resolve('app.config.js');
|
|
417
|
+
try {
|
|
418
|
+
await fs.access(configPath);
|
|
419
|
+
// File exists but failed to import — surface the real error
|
|
420
|
+
throw new Error(`Failed to load app.config.js: ${e instanceof Error ? e.message : e}`);
|
|
421
|
+
} catch (accessErr) {
|
|
422
|
+
if (accessErr instanceof Error && accessErr.message.startsWith('Failed to load'))
|
|
423
|
+
throw accessErr;
|
|
424
|
+
throw new Error('Could not find app.json or app.config.js');
|
|
425
|
+
}
|
|
417
426
|
}
|
|
418
427
|
}
|
|
419
428
|
}
|