We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0510eac commit f4e8055Copy full SHA for f4e8055
apps/console/src/mocks/browser.ts
@@ -15,6 +15,16 @@ let kernel: ObjectKernel | null = null;
15
let driver: InMemoryDriver | null = null;
16
17
export async function startMockServer() {
18
+ // Polyfill process.on for ObjectKernel in browser environment
19
+ // This prevents the "process.on is not a function" error when ObjectKernel initializes
20
+ try {
21
+ if (typeof process !== 'undefined' && !(process as any).on) {
22
+ (process as any).on = () => {};
23
+ }
24
+ } catch (e) {
25
+ console.warn('[MSW] Failed to polyfill process.on', e);
26
27
+
28
if (kernel) {
29
console.log('[MSW] ObjectStack Runtime already initialized');
30
return kernel;
0 commit comments