Fix dynamic import of child_process

This commit is contained in:
vgcman16 2025-06-05 22:03:45 -05:00
parent 1da8c6d248
commit 7033e2821d
3 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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