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"
}
}
I solved it like this in terminal
$ heroku plugins:install buildpack-registry
$ heroku plugins:install buildpacks
may be it works
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With