0

I am trying to deploy my web3 next.js project in Heroku, but I am getting errors in installing the node packages.

I tried using different node versions and different versions if the web3 package still getting the same error

How can I change the build to avoid the error

Build logs

-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Node.js app detected
   
-----> Creating runtime environment
   
   NPM_CONFIG_LOGLEVEL=error
   NODE_VERBOSE=false
   NODE_ENV=production
   NODE_MODULES_CACHE=true
   
-----> Installing binaries
   engines.node (package.json):  10.17.0
   engines.npm (package.json):   unspecified (use default)
   
   Resolving node version 10.17.0...
   Downloading and installing node 10.17.0...
   Using default npm version: 6.11.3
   
-----> Installing dependencies
   Installing node modules
   npm ERR! Error while executing:
   npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/web3-js/WebSocket-Node.git
   npm ERR! 
   npm ERR! Host key verification failed.
   npm ERR! fatal: Could not read from remote repository.
   npm ERR! 
   npm ERR! Please make sure you have the correct access rights
   npm ERR! and the repository exists.
   npm ERR! 
   npm ERR! exited with error code: 128
   
   npm ERR! A complete log of this run can be found in:
   npm ERR!     /tmp/npmcache.Y77wE/_logs/2022-01-16T17_01_27_392Z-debug.log
 -----> Build failed
   
   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys
   
   If you're stuck, please submit a ticket so we can help:
   https://help.heroku.com/
   
   Love,
   Heroku
   

! Push rejected, failed to compile Node.js app. ! Push failed

package.json

{
   "name": "d-kickstarter",
   "version": "1.0.0",
   "description": "kickstarter dapp",
   "engines": {
     "node": "10.17.0"
   },
   "scripts": {
     "test": "mocha",
     "dev": "node server.js",
     "build": "next build",
     "heroku-postbuild": "npm run build",
     "start": "node server.js"
  },
  "dependencies": {
    "fs-extra": "^10.0.0",
    "ganache-cli": "^6.12.2",
    "git": "^0.1.5",
    "mocha": "^9.1.1",
    "next": "^10.0.5",
    "next-routes": "^1.4.2",
    "react": "^16.14.0",
    "react-dom": "^16.14.0",
    "semantic-ui-css": "^2.4.1",
    "semantic-ui-react": "^2.0.4",
    "solc": "^0.4.17",
    "truffle": "^5.4.6",
    "truffle-hdwallet-provider": "^1.0.17",
    "web3": "^1.0.0-beta.55"
  }
}

0 Answers0