1

Trying to deploy a Laravel+vue application to heroku but when using git push heroku master I get the following trace (only part of the whole trace is shown but it is the part which I believe to be the problem - if not let me know):

remote:        npm ERR! code EINTEGRITY
remote:        npm ERR! sha512- 
Prh/h9CB1jBCBIjSLD6kvIWhMV5S25Bwv7yK0fYJSOTIyg1CmU9OqNdRVCkdWyQY1Hkvm+1YdXJzh3xYupq1KA== 
integrity checksum failed when using sha512: wanted sha512- 
Prh/h9CB1jBCBIjSLD6kvIWhMV5S25Bwv7yK0fYJSOTIyg1CmU9OqNdRVCkdWyQY1Hkvm+1YdXJzh3xYupq1KA== but 
got sha512- 
QItiGZBy5TstGy+q8mjQTMGRlDDOARXLxH+sgVm1n/LYeo0zFcQlcCh8m4zi8QxctrxB9Kue/lStc/RD5iLadQ==. 
(896052 bytes)
remote:        
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /tmp/npmcache.8lpmC/_logs/2020-06-05T11_28_24_085Z-debug.log
remote: 
remote: -----> Build failed
remote:        
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:        
remote:        Some possible problems:
remote:        
remote:        - Node version not specified in package.json
remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js- 
version
remote:        
remote:        Love,
remote:        Heroku
remote:        
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 

and this my package.json

{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"postinstall": "npm run prod",
"heroku-postbuild": "npm run prod"
},
"devDependencies": {
"axios": "^0.19",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.5.1",
"laravel-mix": "^5.0.1",
"lodash": "^4.17.13",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.20.1",
"sass-loader": "^8.0.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"@fullcalendar/core": "^4.4.0",
"@fullcalendar/daygrid": "^4.4.0",
"@fullcalendar/interaction": "^4.4.0",
"@fullcalendar/vue": "^4.4.0",
"@types/dhtmlxgantt": "^6.0.2",
"admin-lte": "^3.0.2",
"babel-runtime": "^6.26.0",
"bootstrap-vue": "^2.15.0",
"dhtmlx-gantt": "^6.3.7",
"laravel-echo": "^1.7.0",
"laravel-vue-pagination": "^2.3.1",
"mdbvue": "^6.7.0",
"moment": "^2.24.0",
"pusher-js": "^5.1.1",
"sweetalert2": "^9.8.2",
"vform": "^1.0.1",
"vue-full-calendar": "^2.7.0",
"vue-print-nb": "^1.5.0",
"vue-progressbar": "^0.7.5",
"vue-router": "^3.1.6",
"vuex": "^3.1.3"
},
"engines": {
"node": "12.x"
}
}

There's a bunch of error inside and I have no idea why this happen. but after many research i try many ways bu i didn't find the solution .So any help guys i'm stuck here since 2 days

5
  • Try specifying an npm version as well: "npm": "6.x" devcenter.heroku.com/articles/… Commented Jun 5, 2020 at 11:55
  • Look into your package-lock.json file ctrl+f for sha512- QItiGZBy5TstGy+q8mjQTMGRlDDOARXLxH+sgVm1n/LYeo0zFcQlcCh8m4zi8QxctrxB9Kue/lStc/RD5iLadQ== deinstall the mentioned package and install again. Commit and push to Heroku again. Commented Jun 5, 2020 at 11:57
  • I try it but the same result @GeonGeorge Commented Jun 5, 2020 at 12:00
  • The integrity check error is definitely from the package-lock.json. What happens if you remove the package-lock.json and then deploy the app - do you still get the error? Also, what happens when you run npm ci locally with the package-lock.json in place? Do you get the same error? Commented Jun 5, 2020 at 18:55
  • when i remove the package-lock.json i got this error > [email protected] install /tmp/build_169da5ac7ea03d1575b1f90a1c13d36f/node_modules/fsevents remote: > node install.js remote: remote: remote: Skipping 'fsevents' build as platform linux is not supported remote: npm ERR! Cannot read property 'length' of undefined @DanielleAdams Commented Jun 5, 2020 at 19:21

3 Answers 3

1

Where you have specified the node version also specify the node version. see if it works. It worked for me.

"engines": { "node": "12.x", "npm": "your version" }

Sign up to request clarification or add additional context in comments.

Comments

0

Specifying the engines object-block helped me with both a Laravel app and a Rails app

package.json (append)

"engines": {
    "node": "12.x"
}

Sort-of odd, but when it works, it works.

I also added a @dependabot rebase so that my preview builds using heroku would allow me to verify in-branch that this was the only problem preventing the applications from building.

Comments

0

Check your versions of node and npm in terminal:

node -v

npm -v

and update both in your package.json (example):

  "engines": {
    "node": "14.x",
    "npm": "7.x"
  }

just putting node version didn't help me since heroku automatically tried to build another version of npm and crashed

read more here: https://devcenter.heroku.com/articles/deploying-nodejs#specify-the-version-of-node

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.