aws-doc-sdk-examples icon indicating copy to clipboard operation
aws-doc-sdk-examples copied to clipboard

[Bug]: Compilation Errors in Textract App, and unresolved dependencies

Open rmadan2 opened this issue 1 year ago • 0 comments

Expected behavior

I am trying to run the Textract App example (https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javascriptv3/example_code/cross-services/textract-react), and I expect that after running npm start, the code gets compiled without error, and the browser automatically opens to a sign-in page. Furthermore, the tsconfig.json file is missing from the repo. P.S:I am a node.js and npm newbie.

Actual behavior

I am running into many unresolvable npm dependencies, particularly regarding eslint. I am running the commands as instructed on the example's github page. After running npm start, the browser does open up, but the terminal shows an error stating that it failed to compile the javascript code. Furthermore, the browser screen is blank

Steps to reproduce

1. cd aws-doc-sdk-examples/javascriptv3/example_code/cross-services/textract-react
2. npm install
3.aws cloudformation create-stack --stack-name <stack-name> --template-body file://setup.yaml --capabilities CAPABILITY_IAM
4. node AddRemoveAssets.js add <stack-name>
5. cd src
6. npm start

Logs / stacktrace (if applicable)

Failed to compile.

Failed to load parser '@typescript-eslint/parser' declared in '../../../.eslintrc.json': Cannot find module '@typescript-eslint/parser'
Require stack:
- /home/correct-ai/textract_app/aws-doc-sdk-examples/javascriptv3/.eslintrc.json

Which SDK were you using?

JavaScript (v3)

Which OS were you using?

Linux

SDK version

No response

OS version

Ubuntu 20

rmadan2 avatar Dec 06 '23 00:12 rmadan2