Converting circular structure to JSON
I have recently encountered the below error while using the JSON.stringify for a class object. Error: “stack”:[“TypeError: Converting circular structure to JSON”,” –> starting at object with constructor ‘Cluster'”,” | property ‘_source’ -> object with constructor ‘AutoconfSource'”,” — property ‘_cluster’ closes the circle”,” at JSON.stringify (<anonymous>)” Let’s decode this in this article, so that it […]
JSON.stringify() returns empty object.
We often encounter this issue, that while trying to stringify the error object, it returns the empty object. Many developers have below questions in their mind. Q. JSON.stringify is not able to return any value for error objects, neither throwing any error why? Q. JSON.stringify is not working properly for error object why? Q. JSON.stringify […]
AWS codeBuild error: Unknown runtime version
Error: YAML_FILE_ERROR Message: Unknown runtime version named ‘14.21-alpine’ of nodeJs. This build image has the following versions: 10, 12. Details: While updating the node version in buildSpec.yml. we often see this type of error occurs. this error indicates that the codeBuild runtime used in the build process don’t have the support for the given nodeJs […]
Base64 Encode/Decode a value in Nodejs
You can encode the data in to base64 encoding in Nodejs by using the global Buffer class. First create a buffer instance using the Buffer.from method.