sencha extjs npm build on Heroku requires JRE - node.js

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

Related

Facing the error in deploying React web app to heroku

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.

Heroku - '#heroku/buildpack-registry not accessible from #heroku-cli/plugin-buildpacks'

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

HEROKU : node-pre-gyp install --fallback-to-build

I had this problem since I used #discordjs/opus, I saw a big bunch of similar problems everywhere, and nothing helped me changing this error. It always concern node-pre-gyp. I first tried to put it manually in my package.json, and the build suceeded, but there was no sound siplayed, and a lot of warning messages in the build log... Also some people had issues with bcrypt, but it wasn't the case here...
Thanks for your help!
-----> 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.18.4...
Using default npm version: 6.14.6
-----> Restoring cache
- node_modules is checked into source control and cannot be cached
-----> Installing dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
> #discordjs/opus#0.3.2 install /tmp/build_2510a47a_/node_modules/#discordjs/opus
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! #discordjs/opus#0.3.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the #discordjs/opus#0.3.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.N30Iz/_logs/2020-09-28T09_36_00_646Z-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_modules checked into source control
https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits
- 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`
Well, as JM-AGMS said, the solution was to make visible package lock, type the node engine in the package, and remove the node modules folder in order to have a succeeded build.
However, the error about node pre-gyp is still there.

NodeJS App Deployment Error in Heroku via Github Push

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.

Second Node App Deploy on Heroku always Fails

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.

Resources