Invalid JSON throws error on the wrong line - node.js

I am trying to create a JSON validating script. I want to create a custom message when there is a syntax error in the JSON. But when I import the invalid JSON the line of the error is wrong.
the error is on line 11
When I run this script I get

Related

Catch last command error message in Linux

I'm trying to understand if there is a way to catch the error message from the last command that was executed in the shell. I aim to catch any error (outputted from shell scripts/python/etc..) and I wonder if there is a single place where the error messages are written. I'm building a script that tries to parse error message from the last command and find solutions and I would like that the script will run after the command was already executed and that the last error will be parsed.
Thanks!

ERROR: Error accessing files to attach: Expecting Ant GLOB pattern

I'm getting an error while attaching a file to the mail post Jenkins job.
ERROR: Error accessing files to attach: Expecting Ant GLOB pattern, but saw '/Test/reports/test_report.html' See http://ant.apache.org/manual/Types/fileset.html for syntax
Just a workaround, copy the file from its location to $WORKSPACE
cp $WORKSPACE/Test/reports/test_report.html $WORKSPACE/test_report.html
and just specify "test_report.html" in attachment field of your jenkins.

Having problems downloading rancher to my machine

I hope all is well with this pandemic going on. To get to the chase, I'm trying to install rancher on my mac and I've been stuck for the longest at this point. I believe I have everything downloaded properly. Is there something that I'm missing?
this is running on redhat os linux btw
and this is the command that I am trying to run: ./kubectl -n cattle-system apply -R -f ./rancher
and this is a look at my directory
Thank You So Much!
error validating "rancher/Chart.yaml": error validating data: kind not set; [![enter image description here][1]][1]if you choose to ignore these errors, turn validation off with --validate=false
error parsing rancher/templates/clusterRoleBinding.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error parsing rancher/templates/deployment.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error parsing rancher/templates/ingress.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error parsing rancher/templates/issuer-letsEncrypt.yaml: json: line 0: invalid character '{' looking for beginning of object key string
error parsing rancher/templates/issuer-rancher.yaml: json: line 0: invalid character '{' looking for beginning of object key string
error parsing rancher/templates/service.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error parsing rancher/templates/serviceAccount.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error validating "rancher/values.yaml": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
You should follow the installation instructions for HA here: https://rancher.com/docs/rancher/v2.x/en/installation/k8s-install/ or for standalone mode here: https://rancher.com/docs/rancher/v2.x/en/installation/other-installation-methods/single-node-docker/
I guess you have downloaded the rancher helm chart directory and trying to install it using kubectl, which wouldn't work.
Under the HA instructions, you will find the helm install command.

Why am I getting this error code in devtools, Error: Failed to construct 'WebSocket' in my console log when i am trying to run a javaScript file?

I am getting an error code in my dev tools.
Error handling response: Error: Failed to construct 'WebSocket': The URL 'ws/ws' is invalid.
at init (chrome-extension://fiegdmejfepffgpnejdinekhfieaogmj/reload.js:22:18)
at chrome-extension://fiegdmejfepffgpnejdinekhfieaogmj/reload.js:65:13
What does this mean and how do I fix it?
I had the same problem and like Aleksey Razbakov said, it's probably from one of your extensions. In my case I had to disabled : Live Server Web Extension. And now this error is gone.

Oracle error log

I have run an SQL script under Linux using #xxx.sql but I get the following error :
Warning: Function created with compilation errors.
The database is in Oracle.
I have used the command SHOW ERROR to get more details and I was wondering if the errors shown are stored in some log file
somewhere? Any idea?

Resources