aws-solutions / qnabot-on-aws

AWS QnABot is a multi-channel, multi-language conversational interface (chatbot) that responds to your customer's questions, answers, and feedback. The solution allows you to deploy a fully functional chatbot across multiple channels including chat, voice, SMS and Amazon Alexa.
https://aws.amazon.com/solutions/implementations/aws-qnabot
Apache License 2.0
401 stars 253 forks source link

Custom deployment instructions fail #602

Closed dthvt closed 1 year ago

dthvt commented 1 year ago

Describe the bug

Following the Custom deployment of QnABot on AWS section of README.md does not successfully deploy QnABot.

To Reproduce

[qnabot-on-aws]$ uname -a
Linux a-2niyg79pdwri5 5.15.104-63.140.amzn2.x86_64 #1 SMP Thu Mar 23 18:40:04 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[qnabot-on-aws]$ npm -version
9.4.2
[qnabot-on-aws]$ node --version
v16.19.0
[qnabot-on-aws]$ npm install
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

added 1527 packages, and audited 1528 packages in 3m

108 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
[qnabot-on-aws]$ npm run config

> qnabot-on-aws@5.3.2 config
> make config.json

node bin/config.js > config.json
[qnabot-on-aws]$ vi config.json
[qnabot-on-aws]$ npm run bootstrap

> qnabot-on-aws@5.3.2 bootstrap
> make bootstrap && ./bin/launch.js dev/bootstrap make-sure --no-interactive --verbose && npm run upload

mkdir -p build/ml_model build/lambda build/documents build/templates/test  build/templates/dev
make ../../build/templates/dev/bootstrap.json -C templates/dev
make[1]: Entering directory `/home/xxxx/repos/qnabot-on-aws/templates/dev'
../../bin/build.js --stack dev/bootstrap --verbose
: No such file or directory
make[1]: *** [../../build/templates/dev/bootstrap.json] Error 127
make[1]: Leaving directory `/home/xxxx/repos/qnabot-on-aws/templates/dev'
make: *** [bootstrap] Error 2

[qnabot-on-aws]$

Expected behavior

Expect the bootstrap CloudFormation to deploy successfully.

Please complete the following information about the solution:

To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, "(SO0189) QnABot [...] v0.0.1".

Screenshots

Additional context

ihmaws commented 1 year ago

Thanks for the issue @dthvt, I walked through the README and wasn't able to reproduce.

Can you confirm that the bin/ directory was correctly cloned? Based of the error, bin/build.js seems to be missing causing your error.

dthvt commented 1 year ago

bin/build.js is there. I am going to try to perform the build on an EC2 instance instead of a Workspace when I have time to see if maybe it's something Workspace specific that's failing.

dthvt commented 1 year ago

@ihmaws I was successful building in a vanilla Amazon Linux 2 EC2 instance and eventually tracked this down to being caused by the repo getting checked out with git autocrlf set to true in my local environment, which caused bin/build.js to have dos style line endings. I've rectified on my end. Thanks!