aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.83k stars 822 forks source link

Application bundle generation failed. #13960

Closed mwexcell closed 1 month ago

mwexcell commented 1 month ago

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v20.17.0

Amplify CLI Version

12.13.0

What operating system are you using?

Ubuntu LTS

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

no

Describe the bug

amplify publish --invalidateCloudFront results in:

Application bundle generation failed. [15.408 seconds]

✘ [ERROR] Could not resolve "util"

node_modules/aws-cdk/lib/logging.js:7:21:
  7 │ const util = require("util");
    ╵                      ~~~~~~

The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

frontend build command exited with code 1 🛑 1

Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report' Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Expected behavior

I expect it to successfully deploy

Reproduction steps

Since this is coming from logging.js in the aws-cdk module, I'm not sure how to recreate other than just running the amplify publish command.

Project Identifier

1692fb2dd60d899bfa0a3e44db336cf8

Log output

``` # Put your logs below this line ```

Additional information

No response

Before submitting, please confirm:

mwexcell commented 1 month ago

No idea what happened. I hand-built the CDK SQLApi portion of the project and reexported it, and the issue went away. Must have been in an odd state. Sorry about the fire-drill.

github-actions[bot] commented 1 month ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.