EINTEGRITY error when running npm install
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- javascript, node.js
- Domínio
- cli
Direção de pesquisa
Inspecione as declarações de dependências de nativescript e as dependências de tarball marcadas como marked-terminal e cli-table; em seguida, reproduza a falha com npm clean-install usando o package-lock.json registrado. Atualize a resolução de dependências para que o lockfile e o conteúdo do registro coincidam e verifique se uma instalação limpa é concluída sem EINTEGRITY.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 7.1.2
Describe the bug
I have set nativescript as a dev dependency to my project (makes our life easier), but when doing an npm clean-install (thus loading the exact versions in package-lock.json) I get an integrity error.
npm ERR! code EINTEGRITY
npm ERR! sha512-bf7UQUo6n0c3Fxn5OXckpausCWjFg+qGLzN/LnaMsjF+9HYuSMbPPciWI6zPLu+KLnwjqwKzwPkozi/vxJYpvw==
integrity checksum failed when using sha512:
wanted sha512-bf7UQUo6n0c3Fxn5OXckpausCWjFg+qGLzN/LnaMsjF+9HYuSMbPPciWI6zPLu+KLnwjqwKzwPkozi/vxJYpvw==
but got sha512-h/TzJrgwzVV+W6laITBZAxAWfBjX4T0x+LF5XJdS1AzDkXqmraMNnKQ/O/f3AHJKVR85fOglUEdS/B0P1wS7Aw==. (5724 bytes)
Now, I noticed that nativescript depends specifically on cli-table packaged up as a nice tarball in https://github.com/telerik/cli-table/tarball/v0.3.1.2, (inside, the package.json declares version 0.3.1) but also the NPM registry provides the same 0.3.1 version itself.
The Telerik version has a checksum of bf7UQUo6n0c3Fxn5OXckpausCWjFg+qGLzN/LnaMsjF+9HYuSMbPPciWI6zPLu+KLnwjqwKzwPkozi/vxJYpvw== (what's stored in package-lock.json) and the NPM registry has a checksum of h/TzJrgwzVV+W6laITBZAxAWfBjX4T0x+LF5XJdS1AzDkXqmraMNnKQ/O/f3AHJKVR85fOglUEdS/B0P1wS7Aw== (the offending one, as in the error above).
I see that the dependency is inherited from marked-terminal (another non-NPM-repo dependency from https://github.com/NativeScript/marked-terminal/tarball/v3.1.1n) and as far as I can see those were declared A LONG time ago... Maybe it's time to get those deps up-to-date?
Workaround
For people stumbling around and finding the issue as well, this seems to be tricking NPM in resolving stuff correctly:
npm install --save-dev 'https://github.com/telerik/cli-table/tarball/v0.3.1.2'
npm install --save-dev 'https://github.com/NativeScript/marked-terminal/tarball/v3.1.1n'
rm -rf node_modules package-lock.json
npm install
(Basically, add the overridden dependencies from NativeScript to your own project)
- Linguagem predominante
- JavaScript
- Estrelas
- 1.1k
- Forks
- 204
- Merge médio
- 1d 9h
- PRs com merge (30d)
- 8
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NativeScript/nativescript-cli
-
in-progress
NativeScript/nativescript-cli#6140 · 2 comentários · 1 responsável ·
-
NativeScript/nativescript-cli#6090 · 1 responsável ·
-
in progress
NativeScript/nativescript-cli#6015 · 1 reação · 1 responsável ·
-
question
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
NativeScript/nativescript-cli#5992 · 5 comentários ·
-
feature-pending-triage
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
NativeScript/nativescript-cli#5975 ·
Todas as issues de NativeScript/nativescript-cli
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Seeed-Studio/wiki-documents#5655 · 2 comentários ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
capricorn86/happy-dom#2435 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
Edit: CW+ Abertachannels:edit check:passed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
01 type: bug 30 needs: triage 99 tag: UX Accessibility
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100