node deployments fail because of EINTEGRITY

0

Hi there,

sometimes it happens that I get this error on deploying a node project on elastic beanstalk:

 npm ERR! code EINTEGRITY
  npm ERR! Verification failed while extracting @my-package@^1.2.0:
  npm ERR! Verification failed while extracting @my-package@^1.2.0:
  npm ERR! sha512-lQ...HA== integrity checksum failed when using sha512: wanted sha512-lQ...HA== but got sha512-nH...ow==.

It's crazy because sometimes I have the following scenario: When I deploy on my test environment it works fine, but deploying on my prod environment it fails.

I've tested the deployment on my local machine and got the same error. After searching the web I know the problem could solved by running:

npm cache verify

This worked on my local machine but how could I run this line? It even fails on fresh instances. :(

Because it's a common error too I want to mention that I don't upload package-lock.json files. Neither to the main deploying project nor to my private npm packages.

질문됨 5년 전410회 조회
1개 답변
0

Ok, it was obvious: Just add it to preinstall script in package.json.

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠