quero-edu / guidelines

📘 The definitive Quero Education code-style guide.
MIT License
22 stars 2 forks source link

Erro ao instalar o pacote utilizando node v16.15.0 (npm v8.10.0) #79

Closed rodolfo-santos closed 2 years ago

rodolfo-santos commented 2 years ago

Utilizando node v16.15.0 (npm v8.10.0)

Ao tentar instalar o pacote com o comando: npm install --save-dev @quero/eslint-config-base @quero/eslint-config-typescript

O seguinte erro é apresentado:

npm ERR! Cannot read properties of null (reading 'package')

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rodofosantos/.npm/_logs/2022-05-19T12_27_40_722Z-debug-0.log
vitebo commented 2 years ago

tenta instalar só o @quero/eslint-config-base ou o @quero/eslint-config-typescript pra descobrir se o erro acontece com os 2 ou só com um deles

rodolfo-santos commented 2 years ago

Tentei instalar na sequência:

npm i --save-dev @quero/eslint-config-typescript (Deu tudo certo)

npm i --save-dev @quero/eslint-config-base (Erro abaixo)

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @quero/eslint-config-typescript@1.2.0
npm ERR! Found: @quero/eslint-config-base@2.1.0
npm ERR! node_modules/@quero/eslint-config-base
npm ERR!   dev @quero/eslint-config-base@"*" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @quero/eslint-config-base@"file:../eslint-config-base" from @quero/eslint-config-typescript@1.2.0
npm ERR! node_modules/@quero/eslint-config-typescript
npm ERR!   dev @quero/eslint-config-typescript@"^1.2.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @quero/eslint-config-base@undefined
npm ERR! node_modules/@quero/eslint-config-base
npm ERR!   peer @quero/eslint-config-base@"file:../eslint-config-base" from @quero/eslint-config-typescript@1.2.0
npm ERR!   node_modules/@quero/eslint-config-typescript
npm ERR!     dev @quero/eslint-config-typescript@"^1.2.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/rodofosantos/.npm/eresolve-report.txt for a full report.

Aparentemente ta dando conflito no package.lock.json

  (...)
    "node_modules/@quero/eslint-config-typescript": {
      "version": "1.2.0",
      "resolved": "https://registry.npmjs.org/@quero/eslint-config-typescript/-/eslint-config-typescript-1.2.0.tgz",
      "integrity": "sha512-yede7WDCEPBf8tP+C6swCTRiEgtRXicTRoyJK/DaWC9ZgYYORnO9/zd4R+cXY7+emNINMbkjnDmowH7lknH1Rg==",
      "dev": true,
      "peerDependencies": {
        "@quero/eslint-config-base": "file:../eslint-config-base",
        "eslint-plugin-jest": "^25.2.2"
      }
    },
 (...)
vitebo commented 2 years ago

provavelmente por estar usando uma depêndencia de par local: https://github.com/quero-edu/guidelines/blob/master/packages/eslint-config-typescript/package.json#L12

se mudar ali pra olhar pra latest da versão publicada no NPM acho que ja resolve

rodolfo-santos commented 2 years ago

Não tenho permissões nesse repositório, pode conceder ?