mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-23 02:16:08 +00:00
Merge pull request #41 from vgcman16/codex/check-for-bugs-and-errors
Fix dynamic import for system info
This commit is contained in:
commit
da810228a9
@ -8,8 +8,8 @@ try {
|
||||
// Check if we're in a Node.js environment
|
||||
if (typeof process !== 'undefined' && process.platform) {
|
||||
// Using dynamic import to avoid require()
|
||||
const childProcess = { execSync: null };
|
||||
execSync = childProcess.execSync;
|
||||
const { execSync: importedExecSync } = await import('child_process');
|
||||
execSync = importedExecSync;
|
||||
}
|
||||
} catch {
|
||||
// In Cloudflare environment, this will fail, which is expected
|
||||
|
@ -8,8 +8,8 @@ try {
|
||||
// Check if we're in a Node.js environment
|
||||
if (typeof process !== 'undefined' && process.platform) {
|
||||
// Using dynamic import to avoid require()
|
||||
const childProcess = { execSync: null };
|
||||
execSync = childProcess.execSync;
|
||||
const { execSync: importedExecSync } = await import('child_process');
|
||||
execSync = importedExecSync;
|
||||
}
|
||||
} catch {
|
||||
// In Cloudflare environment, this will fail, which is expected
|
||||
|
@ -8,8 +8,8 @@ try {
|
||||
// Check if we're in a Node.js environment
|
||||
if (typeof process !== 'undefined' && process.platform) {
|
||||
// Using dynamic import to avoid require()
|
||||
const childProcess = { execSync: null };
|
||||
execSync = childProcess.execSync;
|
||||
const { execSync: importedExecSync } = await import('child_process');
|
||||
execSync = importedExecSync;
|
||||
}
|
||||
} catch {
|
||||
// In Cloudflare environment, this will fail, which is expected
|
||||
|
Loading…
Reference in New Issue
Block a user