hmrAcceptCheck: Cannot read property … of undefined

🐛 bug report

🎛 Configuration (.babelrc, package.json, cli command)

.babelrc
{
  "presets": [
    "@parcel/babel-preset-env",
    "@babel/preset-typescript",
    ["@babel/preset-react", { "runtime": "automatic" }]
  ],
  "plugins": [
    [
      "import",
      {
        "libraryName": "antd",
        "libraryDirectory": "es",
        "style": false
      }
    ]
  ]
}
package.json
{
  "scripts": {
    "dev:client": "cd ./client && parcel serve ./src/index.html",
  },
  "devDependencies": {
    "@babel/preset-typescript": "7.13.0",
    "@parcel/optimizer-cssnano": "2.0.0-nightly.616",
    "@parcel/optimizer-htmlnano": "2.0.0-nightly.616",
    "@parcel/packager-css": "2.0.0-nightly.616",
    "@parcel/packager-html": "2.0.0-nightly.616",
    "@parcel/transformer-css": "2.0.0-nightly.616",
    "@parcel/transformer-html": "2.0.0-nightly.616",
    "@parcel/transformer-less": "2.0.0-nightly.616",
    "@parcel/transformer-postcss": "2.0.0-nightly.616",
    "@parcel/transformer-posthtml": "2.0.0-nightly.616",
    "@testing-library/jest-dom": "5.11.9",
    "@testing-library/react": "11.2.5",
    "@testing-library/user-event": "12.8.1",
    "@types/jest": "26.0.20",
    "@types/react": "17.0.2",
    "@types/react-dom": "17.0.1",
    "@types/react-router-dom": "5.1.7",
    "@typescript-eslint/eslint-plugin": "4.16.1",
    "@typescript-eslint/parser": "4.16.1",
    "babel-plugin-import": "1.13.3",
    "concurrently": "6.0.0",
    "eslint": "7.21.0",
    "eslint-config-react-app": "6.0.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jest": "24.1.5",
    "eslint-plugin-jsx-a11y": "6.4.1",
    "eslint-plugin-react": "7.22.0",
    "eslint-plugin-react-hooks": "4.2.0",
    "eslint-plugin-testing-library": "3.10.1",
    "husky": "5.1.3",
    "identity-obj-proxy": "3.0.0",
    "jest": "26.6.3",
    "lint-staged": "10.5.4",
    "parcel": "2.0.0-nightly.614",
    "postcss": "8.2.6",
    "postcss-modules": "4.0.0",
    "prettier": "2.2.1",
    "ts-jest": "26.5.2",
    "ts-node-dev": "1.1.6",
    "typescript": "4.2.2",
    "typescript-plugin-css-modules": "3.2.0"
  },
  "dependencies": {
    "antd": "4.13.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-query": "3.12.0",
    "react-router-dom": "5.2.0",
    "web-vitals": "1.1.0"
  },
  "lint-staged": {
    "*.ts": [
      "eslint --fix",
      "prettier --write"
    ],
    "*": [
      "prettier --write"
    ]
  },
  "engines": {
    "node": "14.x.x",
    "npm": "7.x.x"
  },
  "alias": {
    "shared": "./shared"
  },
  "browserslist": {
    "production": [
      ">0.2%%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

🤔 Expected Behavior

Hot Module Reloading should work fine with React and Ant design.

😯 Current Behavior

Hot Module reloading doesn’t work. Instead, an error is thrown:

index.af84b4bc.js:1004 Uncaught TypeError: Cannot read property '9f4c513fc3688190e4b953e8af84b4bc' of undefined
    at hmrAcceptCheck (index.af84b4bc.js:1004)
    at index.af84b4bc.js:1030
    at Array.some (<anonymous>)
    at hmrAcceptCheck (index.af84b4bc.js:1029)
    at hmrAcceptCheck (index.af84b4bc.js:1011)
    at index.af84b4bc.js:813
    at Array.forEach (<anonymous>)
    at WebSocket.ws.onmessage (index.af84b4bc.js:810)

if (!asset.depsByBundle[bundle.HMR_BUNDLE_ID]) {

Screenshot 2021-03-04 at 18 25 16

Screenshot 2021-03-04 at 18 25 24

Screenshot 2021-03-04 at 18 25 30

🌍 Your Environment

Software Version(s)
Parcel 2.0.0-nightly.614+6ce9e707
Node v14.15.5
npm/Yarn 7.5.4
Operating System macOS 11.2.2

1 possible answer(s) on “hmrAcceptCheck: Cannot read property … of undefined