Runtime Error JSON.parse
JSON.pars: unexpected character at line 1 column 2 of the JSON data
Stack AwsConfig.prototype.load@http://localhost:8100/build/main.js:201892:42 @http://localhost:8100/build/main.js:154480:151 webpack_require@http://localhost:8100/build/main.js:20:12 @http://localhost:8100/build/main.js:127053:70 webpack_require@http://localhost:8100/build/main.js:20:12 @http://localhost:8100/build/main.js:63:18 @http://localhost:8100/build/main.js:1:11
I believe the issue is coming for the aws-config.js file inside the aws_cloud_logic_custum. I can replicate the error inside the browser development console. However, since this file was generate I'm not exactly sure what the issue is.
I am also facing same issue.
SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (
I am stuck with this issue since few weeks. Looks like aws_cloud_logic_custom is not returning pure json and creating this issue. but i have no clue as main.js is a generated file and not sure how it works.
This is a handmade workaround. But it can be worthly used until official developer team upgrades the repository.
Open the file client/src/assets/aws-config.js and search for aws_cloud_logic_custom (should be line 9). After this line add this:
aws_cloud_logic_custom = JSON.stringify(aws_cloud_logic_custom);
This solves the issue for me
Could anyone solve this for me?
Uncaught ReferenceError: aws_cloud_logic_custom is not defined
at AwsConfig.load (main.js:202082)
at Object.QueryParams.parseUrl (main.js:154652)
at webpack_require (main.js:20)
at Object.
@plau1129 Have you added the aws-config.js file as mentioned in the point 3 of client setup?
Yes I do.
@plau1129 do you have the <script src="assets/aws-config.js"></script> line in the head tag of your client/index.html ?
I think so. I didn't change anything after cloning the example. It was successfully run for only one time and then showing errors.
Hi All,
@SimoneMSR solution fixed the problem for me and allows the app to run.
Thanks @SimoneMSR !!
Lee