aws-samples / amazon-connect-chat-translate

AWS Amplify project to demonstrate Amazon Connect Chat with realtime language detection and translation
MIT No Attribution
9 stars 57 forks source link

amplify hosting fails with Unknown token: yarn error #16

Closed nyalavarthi closed 3 months ago

nyalavarthi commented 3 months ago

I have successfully deployed the repo two weeks ago and able to test the solution . and now been trying to redeploy the same repo in a different aws account using amplify web hosting console which is the exact same process. I also tried the latest version of the repo and below is the error in both cases.

 # Completed phase: build
                                 ## Completed Backend Build
2024-03-22T13:09:59.449Z [INFO]: {"backendDuration": 170}
                                 ## Starting Frontend Build
                                 # Starting phase: preBuild
                                 # Executing command: yarn install
2024-03-22T13:10:00.244Z [INFO]: yarn install v1.22.19
2024-03-22T13:10:00.321Z [WARNING]: error An unexpected error occurred: "Unknown token: { line: 3887, col: 1, type: 'INVALID', value: undefined } 3887:1 in /codebuild/output/src1431019503/src/amazon-connect-chat-translate/yarn.lock".
2024-03-22T13:10:00.322Z [INFO]: info If you think this is a bug, please open a bug report with the information provided in "/codebuild/output/src1431019503/src/amazon-connect-chat-translate/yarn-error.log".
                                 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
2024-03-22T13:10:00.332Z [ERROR]: !!! Build failed
2024-03-22T13:10:00.333Z [ERROR]: !!! Error: Command failed with exit code 1
nyalavarthi commented 3 months ago

Got the latest commits into my fork and now getting different error , i am trying this in two different accounts in two two different regions and have same error in both cases


2024-03-27T16:27:21.901Z [INFO]: # Completed phase: preBuild
                                 # Starting phase: build
2024-03-27T16:27:21.902Z [INFO]: # Executing command: REACT_APP_CONNECT_REGION=${REACT_APP_CONNECT_REGION}
                                 # Executing command: REACT_APP_CONNECT_INSTANCE_ID=${REACT_APP_CONNECT_INSTANCE_ID}
                                 # Executing command: yarn run build
2024-03-27T16:27:22.033Z [INFO]: yarn run v1.22.0
2024-03-27T16:27:22.067Z [INFO]: $ craco build
2024-03-27T16:27:23.196Z [INFO]: Creating an optimized production build...
2024-03-27T16:27:26.825Z [WARNING]: One of your dependencies, babel-preset-react-app, is importing the
                                    "@babel/plugin-proposal-private-property-in-object" package without
                                    declaring it in its dependencies. This is currently working because
                                    "@babel/plugin-proposal-private-property-in-object" is already in your
                                    node_modules folder for unrelated reasons, but it may break at any time.
                                    babel-preset-react-app is part of the create-react-app project, which
                                    is not maintianed anymore. It is thus unlikely that this bug will
                                    ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
                                    your devDependencies to work around this error. This will make this message
                                    go away.

2024-03-27T16:28:16.614Z [INFO]: Failed to compile.
2024-03-27T16:28:16.620Z [INFO]: Attempted import error: '@aws-amplify/auth' does not contain a default export (imported as 'Auth').
2024-03-27T16:28:16.693Z [WARNING]: error Command failed with exit code 1.
2024-03-27T16:28:16.694Z [INFO]: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2024-03-27T16:28:16.739Z [ERROR]: !!! Build failed
2024-03-27T16:28:16.739Z [ERROR]: !!! Error: Command failed with exit code 1
2024-03-27T16:28:16.739Z [INFO]: # Starting environment caching...