I am attempting to launch my Nuxt SSR/Universal app through Heroku, due to Netlify no longer meeting my needs (I need backend functionality). By following the tutorial here, and then trying to deal with subsequent errors through use of third-party buildpacks, and I ended up at the following error:
npm ERR! #heroku/buildpack-registry not accessible from #heroku-cli/plugin-buildpacks
full output for context:
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=false
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): 14.x
engines.npm (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.15.0...
Using default npm version: 6.14.8
-----> Installing dependencies
Installing node modules
npm ERR! #heroku/buildpack-registry not accessible from #heroku-cli/plugin-buildpacks
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.dVBXd/_logs/2020-11-01T03_35_25_039Z-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
As near as I can tell, there isn't a buildpack-registry folder on my local copy of #heroku, so I don't know what that folder is supposed to have. I have the Heroku CLI for npm, and running heroku buildpacks gets me:
1. heroku/nodejs
2. https://github.com/stomita/heroku-buildback-phantomjs.git
which should all be valid. I've tried deploying on a clean environment with the same result.
Sorry if the question is a bit rambly, I just have no idea where to start trying to figure this out.
It urns out I forgot to install some packages the #heroku-cli requires. Running the following install command fixed it for me, but you may be missing packages that I have, or I may be missing packages that you have.
npm i #heroku/buildpack-registry async-file cli-ux got phoenix
I was initially confused because there was no #heroku module, but it was only accessible as the #heroku/buildpack-registry
Related
Trying to get my sencha ExtJS app to compile on heroku. It is an npm app but requires JRE to compile. How do I make JRE available on heroku? my thinking is a build pack but have no idea how to find one that suits my needs or make one.
I appreciate any help that does not include the idea of "don't use extjs". ;)
-----> Building on the Heroku-22 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): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 16.x...
Downloading and installing node 16.17.1...
Using default npm version: 8.15.0
-----> Installing dependencies
Installing node modules
npm ERR! code 126
npm ERR! path /tmp/build_6f27fe6d/node_modules/#sencha/cmd
npm ERR! command failed
npm ERR! command sh /tmp/install-bad0c5cf.sh
npm ERR! i [ext]: platform-install: #sencha/cmd v7.6.0 installed
npm ERR! A JRE is required to download and run Sencha Cmd in linux.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.ImKdt/_logs/2022-10-09T17_30_24_436Z-debug-0.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
I tried to deploy my React web app to heroku via my github repository but I get the following error, ! Push rejected, failed to compile React.js (create-react-app) multi app. I crawled all over the internet in the search of the solution, but I didn't find any. The complete log that I have got is as follows,
-----> Using buildpack: mars/create-react-app
-----> React.js (create-react-app) multi app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
=====> Detected Framework: Multipack
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 14.x
engines.npm (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.17.0...
Using default npm version: 6.14.13
-----> Installing dependencies
Installing node modules
npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR!
npm ERR! Invalid: lock file's #material-ui/lab#4.0.0-alpha.58 does not satisfy #material-ui/lab#*
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.Y9WIv/_logs/2021-05-15T16_32_16_496Z-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 React.js (create-react-app) multi app.
! Push failed
Any idea as to where am going wrong? Your help is really appreciated.
UPDATE Clearing my build cache and deploying with no package-lock.json at all fixed.
Deploying my Node app to Heroku has started failing with Host key verification failed at installation of one of my dependencies, a public repository:
-----> Monorepo app detected
Copied /server to root of app successfully
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=DEVELOPMENT
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): 10.x
engines.npm (package.json): unspecified (use default)
Resolving node version 10.x...
Downloading and installing node 10.22.1...
Using default npm version: 6.14.6
-----> Restoring cache
- node_modules
-----> Installing dependencies
Installing node modules
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git#github.com/ethereumjs/ethereumjs-abi.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.RchR7/_logs/2020-10-25T17_11_28_328Z-debug.log
-----> Build failed
There's been no change to my buildpacks, which were working before:
1. https://github.com/lstoll/heroku-buildpack-monorepo
2. https://github.com/heroku/heroku-buildpack-nodejs
App has been running on Heroku for weeks, using the packages that ethereumjs-abi is a dependency of. (It isn't a direct dependency of my app.)
ethereumjs-abi hasn't updated since I started using it
App still runs correctly locally
My own repo is private, but the package repo is public.
I changed my SSH keys recently, but since adding them to GitHub haven't had any other SSH issues. I've now added the new key to Heroku with heroku keys:add and it had no effect.
Previously I was specifying engines: { node: 10.x }, but have now also tried 12.x and 14.x
Pushing from local master to Heroku master
Yeah a few days wasted so far...
Faced with the same issue when replaced npm package with my own fork and provided custom link on github.com.
What helped:
remove package-lock from GIT
clear cache with heroku builds:cache:purge --app $HEROKU_APP_NAME --confirm $HEROKU_APP_NAME
I am trying to deploy my app in Heroku server to be available in my customized domain name. Everything builds locally, but When I try to deploy in Heroku, the following error pops up. Please help.
This is my build log:
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 12.x...
Downloading and installing node 12.16.3...
Using default npm version: 6.14.4
-----> Restoring cache
Cached directories were not restored due to a change in version of node, npm, yarn or stack
Module installation may take longer for this build
-----> Installing dependencies
Installing node modules
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "[object Object]": Tags may not have any characters that encodeURIComponent encodes.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.vvKxN/_logs/2020-05-23T20_24_41_347Z-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
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
As the error says, you have not mentioned npm and node version in the package.json file.
"engines": {
"npm": "x",
"node": "y"
}
replace x and y with your version of npm and node.
node -v and npm -v would provide you with your versions.
You have possible problem 'Node version not specified in package.json'. You need to describe what version of node and npm or yarn you have using.
Why is my Node.js build failing because of an invalid semver requirement? might help.
Im experiencing a weird issue with Heroku when deploying.
My second deploy (after committing new github changes and pushing them to my app) always seems to crash with the same error message, however, if I create a new Heroku app and deploy it there, it will always deploy successfully.
This is the error that I receive when the build fails.
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 8.x...
Downloading and installing node 8.9.4...
Using default npm version: 5.6.0
-----> Restoring cache
Loading 2 from cacheDirectories (default):
- node_modules
- bower_components (not cached - skipping)
-----> Building dependencies
Installing node modules (package.json + package-lock)
npm ERR! path /tmp/build_ab6facc2006ab24a04683a1ab7266974/bothello-Bothello-Faq-v2-Demo-e5f231b/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/tmp/build_ab6facc2006ab24a04683a1ab7266974/bothello-Bothello-Faq-v2-Demo-e5f231b/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist' -> '/tmp/build_ab6facc2006ab24a04683a1ab7266974/bothello-Bothello-Faq-v2-Demo-e5f231b/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/.minimist.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /app/.npm/_logs/2018-01-06T05_06_42_422Z-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
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
Im a bit stuck here on what to do. Any help would be great.
Cheers,
J
To anyone interested, I fixed this by disabling the Node Modules Cache via the Heroku CLI:
heroku config:set NODE_MODULES_CACHE=false --app app_name
This has fixed the build issue.