JinhangZhu / jinhang.work

Source code of my blog website.
https://jinhang.work/
3 stars 0 forks source link

Unable to deploy site on netlify: code EINTEGRITY #11

Closed JinhangZhu closed 3 years ago

JinhangZhu commented 3 years ago

Deploy log:

12:29:04 PM: Build ready to start
12:29:06 PM: build-image version: be42e453d6c8f171cc2f654acc29c0a8b60e6d93
12:29:06 PM: build-image tag: v3.7.1
12:29:06 PM: buildbot version: 94f1b7736437a080e02c046e77c9a098022fec84
12:29:06 PM: Building without cache
12:29:06 PM: Starting to prepare the repo for build
12:29:07 PM: No cached dependencies found. Cloning fresh repo
12:29:07 PM: git clone https://github.com/JinhangZhu/jinhang.work
12:29:07 PM: Preparing Git Reference refs/heads/master
12:29:09 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'npm run build' versus 'hugo --gc --minify && ./node_modules/gulp/bin/gulp.js build' in the Netlify UI
12:29:09 PM: Starting build script
12:29:09 PM: Installing dependencies
12:29:09 PM: Python version set to 2.7
12:29:10 PM: v12.18.0 is already installed.
12:29:11 PM: Now using node v12.18.0 (npm v6.14.4)
12:29:11 PM: Started restoring cached build plugins
12:29:11 PM: Finished restoring cached build plugins
12:29:11 PM: Attempting ruby version 2.7.1, read from environment
12:29:12 PM: Using ruby version 2.7.1
12:29:12 PM: Using PHP version 5.6
12:29:12 PM: Started restoring cached node modules
12:29:12 PM: Finished restoring cached node modules
12:29:13 PM: Installing NPM modules using NPM version 6.14.4
12:29:16 PM: npm ERR! code EINTEGRITY
12:29:16 PM: npm ERR! sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ== integrity checksum failed when using sha512: wanted sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ== but got sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==. (15450 bytes)
12:29:16 PM: npm ERR! code EINTEGRITY
12:29:16 PM: npm ERR! sha1-bRX7qITAhnnA136I53WegR4H+kE= integrity checksum failed when using sha1: wanted sha1-bRX7qITAhnnA136I53WegR4H+kE= but got sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== sha1-hckBvWRwznH8S7cjrSCbcPfyhpY=. (3602 bytes)
12:29:18 PM: npm ERR! code EINTEGRITY
12:29:18 PM: npm ERR! sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== integrity checksum failed when using sha512: wanted sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== but got sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==. (6148 bytes)
12:29:19 PM: npm ERR! code EINTEGRITY
12:29:19 PM: npm ERR! sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== integrity checksum failed when using sha512: wanted sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== but got sha512-IZUoxEjNjubzrmvzZU4lKP7OnYmX72XRl3sqkfJhBKweKi5rnGi5+IUdlj/H1M+Ip5JQ1WzaDMOBRY90Ajc5jg==. (3950 bytes)
12:29:20 PM: npm ERR! A complete log of this run can be found in:
12:29:20 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-04-11T04_29_16_173Z-debug.log
12:29:20 PM: Error during NPM install
12:29:20 PM: Build was terminated: Build script returned non-zero exit code: 1
12:29:20 PM: Creating deploy upload records
12:29:20 PM: Failing build: Failed to build site
12:29:20 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
12:29:20 PM: Finished processing build request in 13.884338358s
JinhangZhu commented 3 years ago

The solution: Delete package-lock.json and commit the change.

Because the contents in JSON may be contradictory to those in netlify. Ref: https://answers.netlify.com/t/eintegrity-error-on-default-gatsby-site/2250

image