Receiving `DeprecationWarning: Invalid 'main' field` for `cloudform` dependency on most Amplify commands with Node 16+

See original GitHub issue

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?

pnpm

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

v16.13.2

Amplify CLI Version

7.6.23

What operating system are you using?

Mac

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

n/a

Amplify Categories

Not applicable

Amplify Commands

Not applicable

Describe the bug

Upon executing an amplify command we receive the following error:

(node:52156) [DEP0128] DeprecationWarning: Invalid 'main' field in '/Users/josef/.fnm/node-versions/v16.13.2/installation/pnpm-global/5/node_modules/.pnpm/amplify-provider-awscloudformation@5.9.9/node_modules/cloudform/package.json' of 'packages/cloudform/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)

Fortunately this does not block us from proceeding with the execution.

image

Pressing the up arrow to modify the API settings duplicates the original output

image

Current Workaround is to downgrade to Node 14

Expected behavior

no deprecationwarning error

Reproduction steps

run any amplify command other than amplify version

GraphQL schema(s)

# Put schemas below this line


Log output

# Put your logs below this line


Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:18
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
dtc7240commented, Mar 16, 2022

@josefaidt thanks for the heads up that rolling back to 7.6.22 would resolve for now:

npm install -g @aws-amplify/cli@7.6.22

3reactions
ShariqAteeqcommented, Mar 9, 2022

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning message "DeprecationWarning: Invalid 'main' field in ...
This warning message will only show on Node 16. You can safely ignore the warning, but to get rid of it you can...
Read more >
Amplify CLI simplifies starting from existing Amplify projects ...
The 'amplify init' command with a new '–app' parameter clones the git repo, initializes the project, deploys the backend, and configures the ...
Read more >
AWSの基礎を学ぼう 特別編 Amplify Studio ハンズオン
Receiving `DeprecationWarning: Invalid 'main' field` for `cloudform` dependency on most Amplify commands with Node 16+ · Issue #9939 ...
Read more >
Get started - Installation - AWS Amplify Docs
The Amplify Command Line Interface (CLI) is a unified toolchain to create AWS cloud services for your app. Let's go ahead and install...
Read more >
@aws-cdk/assert | Yarn - Package Manager
... Kit (AWS CDK) is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found