How to fix ReferenceError: window is not defined

Self closing this question.

I had to change manifest.yml

modules:
  jira:projectPage:
    - key: foo-application
      title: foo-application
-     function: main
- function:
-   - key: main
-     handler: index.run
+     resource: main
+     render: native
+ resources:
+  - key: main
+    path: src/index.jsx
app:
  runtime:
    name: nodejs18.x
  id: ari:cloud:ecosystem::*******

and from my index.jsx,

import React, { useEffect, useState } from 'react';
import ForgeReconciler, { Text } from '@forge/react';

...

ForgeReconciler.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

This works!

2 Likes