The package may have incorrect main/module/exports specified in its package.json

I get this error in the target application that includes my custom language pack.
The package.json of my language pack has the following details

{
  "name": "@stdcfg/languagepack",
  "version": "0.0.0-setByBuild",
  "main": "lib/index.cjs",
  "type": "module",
  "exports": {
    "import": "./lib/index.js",
    "require": "./lib/index.cjs"
  },
  "types": "lib/index.d.ts",
  "module": "lib/index.js",
  "sideEffects": false,
  "files": [
    "lib"
  ],
  "scripts": {
    "clean": "rimraf coverage/",
    "build": "yarn clean && rollup -c --bundleConfigAsCjs",
    "buildpack": "yarn clean && webpack",
    "test": "jest --coverage -u",
    "test-watch": "jest --watch",
    "updateversion": "npm version",
    "lint": "tslint -c tslint.json 'src/**/*.ts'"
  },
"devDependencies": {
    "@lezer/generator": "^1.0.0",
    "@rollup/plugin-commonjs": "^25.0.7",
    "@rollup/plugin-node-resolve": "^15.2.3",
    "@rollup/plugin-typescript": "^11.1.6",
    "@types/jest": "^29.5.12",
    "@types/node": "^18.15.11",
    "husky": "^1.3.1",
    "jest": "^29.5.0",
    "jest-environment-jsdom": "^29.5.0",
    "prettier": "^2.8.7",
    "pretty-quick": "^1.10.0",
    "rimraf": "^2.6.2",
    "rollup": "^4.12.0",
    "ts-jest": "^29.1.0",
    "ts-loader": "^9.3.1",
    "ts-node": "^10.9.1",
    "tslint": "^6.1.3",
    "tslint-react": "^5.0.0",
    "typescript": "^5.0.3",
    "webpack": "5.78.0",
    "webpack-cli": "5.0.1"
  },
  "dependencies": {
    "@codemirror/autocomplete": "^6.11.0",
    "@codemirror/language": "^6.0.0",
    "@lezer/highlight": "^1.0.0",
    "@lezer/lr": "^1.0.0",
    "react-dev-utils": "^11.0.0"
  }
}

What could be causing this error?