简体   繁体   中英

Yarn - error Couldn't find any versions for "@typescript-eslint/type-utils" that matches "5.31.0"

working on node app, with docker.

getting the error during image build, in the install step.

locally the installation works fine.

we use nexus, but again locally through nexus the installation works.

I tried adding resolutions for the packages in the error still, yarn throws the title error.

Package.json

{
  "name": "my-graphql-service",
  "version": "1.0.0",
  "main": "index.js",
  "repository": "https://github.com/my-graphql-service.git",
  "author": "Itay Tur",
  "license": "MIT",
  "scripts": {
    "dev:edge2": "NODE_ENV=development nodemon -r dotenv/config src/index.ts dotenv_config_path=config/edge2.env",
    "dev:qa": "NODE_ENV=development nodemon -r dotenv/config src/index.ts dotenv_config_path=config/qa.env",
    "generate:integrations": "node src/generate-integrations-code.js",
    "build": "rimraf build && NODE_ENV=production tsc --project tsconfig.json",
    "start": "NODE_ENV=production node -r dotenv/config build/index.js dotenv_config_path=.env.graph",
    "test": "NODE_ENV=development jest --detectOpenHandles --forceExit",
    "test:watch": "NODE_ENV=development jest --watch --detectOpenHandles --forceExit",
    "format": "prettier --write .",
    "lint": "eslint . --fix",
    "prepare": "husky install"
  },
  "resolutions": {
    "pretty-format": "^26.0.1",
    "jest-diff": "^25.1.0",
    "jest-matcher-utils": "^25.1.0",
    "@typescript-eslint/type-utils": "@5.30.6",
    "@typescript-eslint/utils": "5.30.6"
  },
  "dependencies": {
    "@graphile-contrib/pg-order-by-related": "^1.0.0-beta.6",
    "@graphile-contrib/pg-simplify-inflector": "^6.1.0",
    "@graphile/pg-aggregates": "^0.1.0",
    "@openapitools/openapi-generator-cli": "2.1.22",
    "cors": "^2.8.5",
    "cptls-common-nodejs": "^5.1.5",
    "dataloader": "^2.1.0",
    "dotenv": "^16.0.1",
    "express": "^4.18.1",
    "postgraphile": "^4.12.9",
    "postgraphile-plugin-connection-filter": "^2.3.0",
    "rimraf": "^3.0.2",
    "typescript": "^4.7.4"
  },
  "devDependencies": {
    "@types/express": "^4.17.13",
    "@types/jest": "^28.1.2",
    "@types/supertest": "^2.0.12",
    "@typescript-eslint/eslint-plugin": "^5.29.0",
    "@typescript-eslint/parser": "^5.29.0",
    "eslint": "^8.18.0",
    "husky": "^8.0.0",
    "jest": "^28.1.3",
    "nodemon": "^2.0.16",
    "prettier": "^2.7.1",
    "supertest": "^6.2.3",
    "ts-jest": "^28.0.5",
    "ts-node": "^10.8.1"
  }
}

Solution:

  1. delete node_modules & yarn.lock

  2. remove the resolutions

  3. run yarn

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM