push jar file to my java heroku app using CLI - heroku

I am running a javascript app in heroku (scoold) and have been told by the developer that there is a new jar file to upload. I Downloaded the heroku cli and jar file and ran the following commands as instructed:
heroku plugins:install java
heroku deploy:jar scoold-x.y.z.jar --app myscooldapp
However, I am getting the following error:
C:\Sites>heroku deploy:jar scoold-pro-1.37.1.jar --app nocodeflow
Uploading scoold-pro-1.37.1.jar
events.js:187
throw er; // Unhandled 'error' event
^
Error: spawn java ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn java',
path: 'java',
spawnargs: [
'-Dheroku.appName=nocodeflow',
'-Xmx1g',
'-Dheroku.jarFile=scoold-pro-1.37.1.jar',
'-Dheroku.jarOpts=',
'-cp',
'C:\\Users\\Artwe\\AppData\\Local\\heroku\\node_modules\\#heroku-cli\\plugin-java\\lib\\heroku-deploy-complete.jar',
'com.heroku.sdk.deploy.DeployJar'
]
}

I create a ticket on the Heroku support center, because I had the same problem.
I want to deploy a simple war and normally I don't need any Node.js ...

Related

Getting this error after running in the cypress dashboard

I am getting this are after running all of my test cases in the cypress dashboard. Can anyone help me to solve this issue? Test cases are running no issues in there.
An error was thrown in your plugins file while executing the handler for the after:run event.
The error we received was:
Error: spawn cucumber-json-formatter.exe ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

sass with auto-refresh using parcel , getting errno: -4058, code: 'ENOENT' when running start script

I'm trying to setup Sass with auto-refresh using parcel,
and when I'm using script "start": "parcel src/index.html", I'm constantly getting the following error:
Error: ENOENT: no such file or directory, open 'D:\vscodeprojects\RSSchool\dict\dict.txt'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at makeCompression (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules\lmdb\dist\index.cjs:2047:19)
at Object.open (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules\lmdb\dist\index.cjs:2057:25)
at new LMDBCache (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules#parcel\cache\lib\LMDBCache.js:81:34)
at resolveOptions (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules#parcel\core\lib\resolveOptions.js:125:168)
at async Parcel._init (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules#parcel\core\lib\Parcel.js:218:27)
at async Parcel.watch (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules#parcel\core\lib\Parcel.js:315:7)
at async run (D:\vscodeprojects\RSSchool\Stage#1\imdenver-JSFELT\english_for_kids\node_modules\parcel\lib\cli.js:351:9) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'D:\vscodeprojects\RSSchool\dict\dict.txt'
}
This dict file outside of the project folder doesn't make sense.
Please advise.
I cloned into your repo and run with below package.json config
Replaced "start":"parcel src/index.html" with "start":"parcel"
App runs

yarn deploy give error with Command failed with exit code 1 when running collection-examples-as

I am trying to run the collection-examples-as near example but when I run yarn deploy it gives me the following error
$ near dev-deploy --wasmFile="./contract.wasm"
Starting deployment. Account id: dev-1637744501224-6323200, node:
https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file:
./contract.wasm
An error occurred
Error: ENOENT: no such file or directory, open './contract.wasm'
[Error: ENOENT: no such file or directory, open './contract.wasm'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: './contract.wasm'
}
error Command failed with exit code 1.
I think the error is it can't find the path to ./contract.wasm so I run yarn build the I tried to deploy it again using yarn deploy but I got another error which is:
$ near dev-deploy --wasmFile="./contract.wasm"
Starting deployment. Account id: dev-1637744501224-6323200, node:
https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file:
./contract.wasm
An error occurred
Error: Can not sign transactions for account dev-1637744501224-6323200 on network
default, no matching key pair found in
InMemorySigner(MergeKeyStore(UnencryptedFileSystemKeyStore(/home/rasha/.near-
credentials), UnencryptedFileSystemKeyStore(/home/rasha/collection-examples-
as/neardev))).
{
type: 'KeyNotFound',
context: undefined
}
any help or suggestions?
There's an issue with old versions of near-cli and dev-deploy.
As a workaround, you can try running the latest cli directly from your terminal:
near dev-deploy --wasmFile="./contract.wasm" -f
Just check that you installed the latest version of near-cli, currently 2.2.0. You can check your version with near --version.
Be sure to run yarn build first, so you'll have the compiled contract.wasm file.
Note: When you run yarn deploy, it uses the old near-cli version defined in package.json. (probably some old version like 1.6.0)
You might also want to check this GitHub issue (dev-deploy error): https://github.com/near/create-near-app/issues/1408

How to resolve this error : spawn yarn ENOENT?

Yarn Install successful:
C:\Users\Yael\Downloads\metamask-extension-8.0.9\metamask-extension-8.0.9>yarn
yarn install v1.22.10
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 2.77s.
Yarn dist error:
C:\Users\Yael\Downloads\metamask-extension-8.0.9\metamask-extension-8.0.9>yarn dist
yarn run v1.22.10
$ yarn build prod
$ node development/build/index.js prod
running task "prod"...
Starting 'prod'...
Starting 'clean'...
(node:12548) ExperimentalWarning: The fs.promises API is experimental
Finished 'clean'
Starting 'styles:prod'...
Finished 'styles:prod'
Starting 'scripts:deps:background'...
Starting 'scripts:deps:ui'...
Starting 'scripts:core:prod:background'...
Starting 'scripts:core:prod:ui'...
Starting 'scripts:core:prod:phishing-detect'...
Starting 'scripts:core:prod:contentscript'...
Starting 'static:prod'...
Starting 'manifest:prod'...
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn yarn ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
C:\Users\Yael\Downloads\metamask-extension-8.0.9\metamask-extension-8.0.9>

Deployment of standalone jar (Heroku) - Exceptions

I am trying to deploy executable war (java -jar myapp.jar) on Heroku, which I am successfully able to execute on local machine.
I followed below steps to do it on heroku using CLI
heroku plugins:install java
heroku create --no-remote --app testjar
heroku deploy:jar target/my-app.jar --app testjar
First two steps run fine... but in 3rd I got below exception. Any idea on the cause ? Or what information it wants? I Have given it all as per the document https://devcenter.heroku.com/articles/deploying-executable-jar-files
Uploading funApp.jar
events.js:167
throw er; // Unhandled 'error' event
^
Error: spawn java ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)
at onErrorNT (internal/child_process.js:421:16)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:252:12)
at onErrorNT (internal/child_process.js:421:16)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
docker#default:/c/Users/Abhi/DockerAppHub/heroku/bin$ ./heroku deploy:jar ./funApp.jar --app testjar08
Uploading funApp.jar events.js:167
throw er; // Unhandled 'error' event
^
Error: spawn java ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)
at onErrorNT (internal/child_process.js:421:16)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:252:12)
at onErrorNT (internal/child_process.js:421:16)
at process.internalTickCallback (internal/process/next_tick.js:72:19)

Resources