Can't import async_hooks from forge/api -

ERROR in ./node_modules/@forge/api/out/api/runtime.js 51:30-70
Module not found: Error: Can’t resolve ‘async_hooks’ in ‘/Users/santhoshkumardhanasekaran/work/vscode/hackathons/2024/codegiest_2024/StrageAI/node_modules/@forge/api/out/api’
@ ./node_modules/@forge/api/out/index.js 51:16-40
@ ./src/frontend/utils/azure.jsx 1:0-35 38:25-30
@ ./src/frontend/handlers/generateOkr.jsx 1:0-49 10:24-39
@ ./src/frontend/components/objectives.jsx 3:0-58 15:33-48
@ ./src/frontend/components/navbar.jsx 4:0-46 13:38-52
@ ./src/frontend/index.jsx 3:0-45 7:52-58

native-ui compiled with 1 error

package.json

{
  "name": "confluence-space-page-ui-kit-2",
  "version": "1.0.39",
  "main": "index.js",
  "license": "MIT",
  "private": true,
  "scripts": {
    "lint": "./node_modules/.bin/eslint src/frontend/**/*"
  },
  "devDependencies": {
    "eslint": "^8.57.1",
    "eslint-plugin-react": "^7.37.2",
    "eslint-plugin-react-hooks": "^4.6.2"
  },
  "dependencies": {
    "@forge/api": "^2.22.1",
    "@forge/bridge": "4.1.0",
    "@forge/react": "10.7.0",
    "@forge/resolver": "1.6.1",
    "@forge/ui": "^1.11.1",
    "react": "^18.2.0",
    "xlsx": "^0.18.5"
  }
}

Hey @sandyinspires,

Looking at your package.json I can see that you’re using the Jira Issue Panel template for the legacy version of UI Kit - this version will no longer supported as of 28 Feb 2025. See https://developer.atlassian.com/platform/forge/ui-kit/upgrade-guides/ for more information.

Have you already upgraded your app?

Cheers!
Mel

1 Like

Thanks, I’ve updated the package.json file.

After downgrading the forge/api version to 2.22.1 it’s not throwing the error.