amplify-backend icon indicating copy to clipboard operation
amplify-backend copied to clipboard

Error generating "amplify_outputs.json" using "npx ampx generate outputs"

Open disinibale opened this issue 1 year ago • 1 comments

Describe the bug I encountered an error while trying to generate the amplify_outputs.json file using the command npx ampx generate outputs, which usually works but not working now because of missing dependencies.

To Reproduce Steps to reproduce the behavior:

  1. Run the command npx ampx generate outputs in the terminal.
  2. Observe the error message displayed.

Expected behavior The amplify_outputs.json file should be generated successfully without any errors.

Error Message

node:internal/modules/cjs/loader:1145
  const err = new Error(message);
              ^

Error: Cannot find module 'aws-cdk-lib/aws-dynamodb'
Require stack:
- /home/bale/Works/emdr-therapist/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/sync-utils.js
- /home/bale/Works/emdr-therapist/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/index.js
- /home/bale/Works/emdr-therapist/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js
- /home/bale/Works/emdr-therapist/node_modules/@aws-amplify/graphql-schema-generator/lib/schema-generator/generate-schema.js

Screenshot image

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 23H2 (OS Build 22631.4169)
  • Node Version 20

Additional context For another context, I host a Frontend application and generate the output from my backend on another Amplify application. But when the application is on build process It keep return this error, which never happen before.

disinibale avatar Oct 02 '24 08:10 disinibale