Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Cannot find module '@heroku/buildpack-registry'

I am trying to deploy a web app on Heroku. I am getting the following error Error: Cannot find module '@heroku/buildpack-registry' I tried adding the version of node I am using but still didn't help. I also upgraded Heroku using npm i [email protected] this too didn't help. Any thoughts on this?

This is my package.json

{"name":"gssrDB",
  "engines": {
    "node": "14.18.0"
  }
  ,
  "scripts": {
    "dev": "nodemon index.js",
    "start": "node index.js"
  },
  "dependencies": {
    "@heroku-cli/plugin-buildpacks": "^7.54.0",
    "@heroku/buildpack-registry": "^1.0.1",
    "async-file": "^2.0.2",
    "cli-ux": "^4.9.3",
    "dotenv": "^9.0.2",
    "ejs": "^3.1.6",
    "ejs-mate": "^3.0.0",
    "express": "^4.17.1",
    "got": "^8.3.2",
    "heroku": "^7.59.0",
    "mongodb": "^3.6.6",
    "mongoose": "^5.12.9",
    "nodemon": "^2.0.13",
    "phoenix": "^1.6.0"
  }
}

like image 381
moinabyssinia Avatar asked Aug 24 '26 06:08

moinabyssinia


2 Answers

I solved it like this in terminal

$ heroku plugins:install buildpack-registry
$ heroku plugins:install buildpacks  

may be it works

like image 126
znehraks Avatar answered Aug 26 '26 18:08

znehraks


I faced a similar problem, and I solved it by using proper node version. For the current heroku version, node16 works, otherwise it cause error in buildpack

like image 21
Sarthak Pokharel Avatar answered Aug 26 '26 18:08

Sarthak Pokharel