Error: Could not find plugin “proposal-private-methods”. Ensure there is an entry in ./available-plugins.js for it.

Bug Report

I’m having a similar issue to the one mention on #11735 but with a different plugin. Here are my system specifications:

System Specifications

System: 
OS:   
>Linux x64 (Ubuntu 20.04 LTS) - **Running as WSL**
>Windows 10 - 19041.450

Binaries:
> Node: 12.14.1
> Yarn: 1.13.0
> npm: 6.13.4

Error Message

The error occurs when running yarn dev and the message is as follow:

Could not find plugin "proposal-private-methods". Ensure there is an entry in ./available-plugins.js for it.

Attempted Solutions

I have tried several potential solutions on both Windows and the Linux WSL. I am getting the same error on both systems. Some of the potential solutions I had tried are as follow:

  1. Adding “resolutions”: {
    “@babel/preset-env”: “7.5.5”
    },
    to package.json

  2. Running npm-force-resolutions with the resolution shown above

  3. Installing npm i @babel/compat-data@7.8.0

  4. Adjust the version numbers

   "devDependencies": {
        "@babel/compat-data": "^7.8.0",
        "@babel/preset-env": "^7.8.0",
        "babel-loader": "^8.1.0",
        ...
    },
  1. Removing the carrots ^ from every version number on the package.json file

  2. Running npm install instead of yarn install

  3. Clearing cache with yarn cache clean before running yarn install

  4. Running yarn upgrade for every Babel and WebPack package

  5. Doing a fresh install of node, npm, and yarn through the Linux WSL instead of Windows

Before every test, I always erased my node_module folder, yarn.lock file, and package-lock file. By the way, the plugin-proposal-private-methods folder is present under node_modules/@babel after every install regardless of using yarn install or npm install.

Here is my package.json file:

{
  "name": "Name",
  "version": "1.29.3",
  "private": true,
  "description": "test",
  "author": "testAuthor",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git@bitbucket.org:someorg/graphql.git"
  },
  "engines": {
    "node": "^12.14.1"
  },
  "main": "src/index.js",
  "rootDir": "/src/",
  "scripts": {
    "migrate9BallData": "APP_ENV=localdev babel-node -r esm ./.utils/firebaseimport.js",
    "noWinner": "APP_ENV=localdev babel-node -r esm ./.utils/racksWithoutWinners.js",
    "build": "./.utils/build.sh",
    "build-server": "yarn && cross-env NODE_ENV=production webpack --config webpack.aws.js",
    "cluster": "yarn && cross-env APP_ENV=localdev NODE_ENV=production webpack --watch --config webpack.local.js",
    "dev": "yarn && cross-env APP_ENV=localdev webpack --config webpack.local.js",
    "localuat": "yarn && cross-env APP_ENV=localuat webpack --config webpack.local.js",
    "localprod": "yarn && cross-env APP_ENV=localprod webpack --config webpack.local.js",
    "gen-models": "cd src/models && node ../../.utils/genModels.js && node ../../.utils/fixDefaultVal.js && cd ../.. && yarn prettier",
    "fix-gen-models": "cd src/models && node ../../.utils/fixDefaultVal.js && cd ../.. && yarn prettier",
    "gen-models-uat": "cd src/models && cross-env APP_ENV=uat node ../../.utils/genModels.js && node ../../.utils/fixDefaultVal.js && cd ../.. && yarn prettier",
    "lint": "eslint --quiet --ext .js ./src",
    "prettier": "prettier --write \"src/**/*.json\" \"src/**/*.js\" \"src/**/*.graphql\"",
    "start": "yarn --prod && APP_ENV=localdev node ./dist/server.js",
    "test": "jest --coverage && cp -r ./coverage ./dist/.",
    "uat": "yarn && cross-env APP_ENV=uat webpack --config webpack.local.js",
    "update-eslint": "(export PKG=eslint-config-airbnb; npm info \"$PKG@latest\" peerDependencies --json | command sed 's/[\\{\\},]//g ; s/: /@/g' | xargs yarn add -D \"$PKG@latest\")",
    "es-admin": "cd es-admin/build && live-server"
  },
  "dependencies": {
    "@apollo/federation": "0.12.1",
    "@apollo/gateway": "0.12.1",
    "@google/maps": "1.1.0",
    "@newrelic/native-metrics": "5.0.0",
    "apollo-engine": "1.1.2",
    "apollo-errors": "1.9.0",
    "apollo-server": "2.10.1",
    "apollo-server-express": "2.10.1",
    "apollo-upload-server": "7.1.0",
    "aws-sdk": "2.630.0",
    "body-parser": "1.19.0",
    "bodybuilder": "2.2.21",
    "cache-manager": "3.1.0",
    "cache-manager-redis-store": "2.0.0",
    "cache-map": "1.1.0",
    "compression": "1.7.4",
    "core-js": "3.6.4",
    "cors": "2.8.5",
    "dataloader": "2.0.0",
    "did-you-mean": "0.0.1",
    "elasticsearch": "16.6.0",
    "express": "4.17.1",
    "express-basic-auth": "1.2.0",
    "firebase-admin": "8.9.2",
    "graphiql": "0.17.5",
    "graphql": "14.6.0",
    "graphql-error-tracking-extension": "0.1.0",
    "graphql-redis-subscriptions": "2.1.2",
    "graphql-server-express": "1.4.1",
    "graphql-subscriptions": "1.1.0",
    "graphql-tag": "2.10.3",
    "graphql-tools": "4.0.7",
    "graphql-voyager": "1.0.0-rc.29",
    "ical-generator": "1.9.2",
    "ioredis": "4.16.0",
    "jsonwebtoken": "8.5.1",
    "key-compressor": "1.0.4",
    "lodash": "4.17.19",
    "merge-graphql-schemas": "1.7.6",
    "moment": "2.24.0",
    "moment-timezone": "0.5.28",
    "mssql": "6.0.1",
    "newrelic": "6.4.2",
    "node-fetch": "2.6.0",
    "node-redis-pubsub": "4.0.0",
    "nodemailer": "6.4.3",
    "q": "1.5.1",
    "raygun": "0.10.2",
    "react": "16.13.0",
    "react-dom": "16.13.0",
    "redis": "3.0.2",
    "request": "2.88.2",
    "request-promise": "4.2.5",
    "sequelize": "5.0.0-beta.12",
    "sequelize-auto": "Poolplayers/sequelize-auto#mssql-schema",
    "sequelize-import": "1.2.1",
    "source-map-support": "0.5.16",
    "sql-formatter": "2.3.3",
    "stripe": "8.24.0",
    "subscriptions-transport-ws": "0.9.16",
    "tedious": "5.0.3",
    "tedious-promises": "0.4.1",
    "uuid": "7.0.1"
  },
  "devDependencies": {
    "@babel/cli": "7.8.4",
    "@babel/core": "7.8.6",
    "@babel/node": "7.8.7",
    "@babel/plugin-proposal-class-properties": "7.8.3",
    "@babel/plugin-proposal-object-rest-spread": "7.8.3",
    "@babel/plugin-proposal-private-methods": "^7.8.3",
    "@babel/preset-env": "7.8.6",
    "@babel/preset-flow": "7.8.3",
    "@babel/preset-react": "7.8.3",
    "@types/jest": "^26.0.10",
    "apollo": "2.24.0",
    "babel-core": "7.0.0-bridge.0",
    "babel-eslint": "10.1.0",
    "babel-jest": "25.1.0",
    "babel-loader": "^8.0.0",
    "babel-plugin-inline-import": "3.0.0",
    "babel-plugin-module-resolver": "4.0.0",
    "babel-plugin-transform-builtin-classes": "0.6.1",
    "babel-plugin-transform-builtin-extend": "1.1.2",
    "babel-root-slash-import": "1.1.0",
    "copy-webpack-plugin": "5.1.1",
    "cross-env": "7.0.0",
    "eslint": "^5.16.0 || ^6.1.0",
    "eslint-config-airbnb": "18.0.1",
    "eslint-config-prettier": "6.10.0",
    "eslint-plugin-import": "2.20.1",
    "eslint-plugin-jsx-a11y": "6.2.3",
    "eslint-plugin-prettier": "3.1.2",
    "eslint-plugin-react": "7.18.3",
    "eslint-plugin-react-hooks": "2.5.0",
    "esm": "3.2.25",
    "jest": "25.1.0",
    "jest-cli": "25.1.0",
    "jest-transform-graphql": "2.1.0",
    "json-loader": "0.5.7",
    "live-server": "1.2.1",
    "nodemon": "2.0.2",
    "nodemon-webpack-plugin": "4.3.1",
    "prettier": "1.19.1",
    "typescript": "^3.9.6",
    "webpack": "4.41.6",
    "webpack-cli": "3.3.11",
    "webpack-merge": "4.2.2",
    "webpack-node-externals": "1.7.2",
    "webpack-shell-plugin-next": "1.1.5"
  },
  "resolutions": {
    "lodash": "4.17.19"
  },
  "jest": {
    "testEnvironment": "node",
    "testPathIgnorePatterns": [
      "/node_modules/",
      "./dist",
      "/__tests__/[^/.]*.js"
    ],
    "transform": {
      "\\.(gql|graphql)$": "jest-transform-graphql",
      ".*": "babel-jest"
    },
    "moduleFileExtensions": [
      "js",
      "json",
      "jsx",
      "ts",
      "tsx",
      "node",
      "graphql"
    ],
    "coverageReporters": [
      "lcov",
      "html",
      "json"
    ]
  }
}

I also attached the yarn-error.log file for reference
yarn-error.log

Thanks for taking the time to read this. Any help is welcome! 😊

1 possible answer(s) on “Error: Could not find plugin “proposal-private-methods”. Ensure there is an entry in ./available-plugins.js for it.

  1. This issue has been fixed in 7127330, preset-env 7.8.7.

    Affected @babel/preset-env versions: 7.8.0 – 7.8.6.

    That said, please update @babel/preset-env to 7.8.7 or better to update all @babel/* to latest versions.