Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amplify insist in trying to use yarn. But I don't even have yarn installed (i had in the past)! #13629

Closed
2 tasks done
programad opened this issue Mar 1, 2024 · 4 comments
Closed
2 tasks done
Labels
functions Issues tied to the functions category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage

Comments

@programad
Copy link

How did you install the Amplify CLI?

npm install -g @aws-amplify/cli

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

v18.18.0

Amplify CLI Version

12.10.1

What operating system are you using?

MacOS Sonoma

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

no manual changes made

Describe the bug

Iam trying to run amplify push and it fails insisting on trying to use Yarn. I had yarn once but I uninstalled, now I only have NPM and PNPM installed.

image

I don't want yarn!

Expected behavior

The expected behaviour is amplify not trying to use a package manager I don't have installed!

Reproduction steps

run amplify push

Project Identifier

b40744bc4b6b4444d01b62d60cb8382b

Log output

# Put your logs below this line

846-[***]sactionchecker-[***]1ZVET/[***]a0d0-[***]7d-[***]ee-[***]f0-[***]05bed"}])
2024-03-01T21:14:16.766Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]nsactiontrigger-[***]8BHQ5/[***]dbf0-[***]7b-[***]ee-[***]f9-[***]15eb3"}])
2024-03-01T21:14:17.565Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]ify-[***]json","Bucket":"[***]ify-[***]aapps-[***]lop-[***]846-[***]ment"}])
2024-03-01T21:14:26.360Z|error : Received error [Error: Command failed with exit code 1: yarn --version
Usage Error: This project is configured to use npm

$ yarn ...] running command [yarn --version]
ShellCommandExecutionError: Received error [Error: Command failed with exit code 1: yarn --version
Usage Error: This project is configured to use npm

$ yarn ...] running command [yarn --version]
2024-03-01T21:17:18.729Z|info : amplify push core functions
2024-03-01T21:17:18.806Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2024-03-01T21:17:22.957Z|info : amplify-provider-awscloudformation.zip-util.downloadZip.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip"},null])
2024-03-01T21:17:22.962Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip","Bucket":"[***]ify-[***]aapps-[***]lop-[***]846-[***]ment"}])
2024-03-01T21:17:25.286Z|info : amplify-provider-awscloudformation.initialize-env.run.cfn.updateamplifyMetaFileWithStackOutputs([{"StackName":"[***]ify-[***]aapps-[***]lop-[***]846"}])
2024-03-01T21:17:28.079Z|info : amplify-provider-awscloudformation.aws-cfn.updateamplifyMetaFileWithStackOutputs.cfn.listStackResources([{"StackName":"[***]ify-[***]aapps-[***]lop-[***]846"}])
2024-03-01T21:17:29.098Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]ify-[***]aapps-[***]lop-[***]846"}])
2024-03-01T21:17:29.946Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]haapps-[***]GQCNA/[***]dd10-[***]ab-[***]ee-[***]e1-[***]489ab"}])
2024-03-01T21:17:29.956Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]psc0421ce9-[***]Q1PPC8/[***]1da0-[***]aa-[***]ee-[***]bc-[***]4c1bf"}])
2024-03-01T21:17:29.961Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]nsactionschecker-[***]85IW4M/[***]8480-[***]b6-[***]ee-[***]e0-[***]90f11"}])
2024-03-01T21:17:29.967Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]nsactiontrigger-[***]AF72L7/[***]8f60-[***]cf-[***]ee-[***]1f-[***]c201b"}])
2024-03-01T21:17:29.973Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]nsactionprocessor-[***]BKEWYC/[***]9b90-[***]a3-[***]ee-[***]d4-[***]966f1"}])
2024-03-01T21:17:29.979Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]nsactioncreation-[***]LJQ6SF/[***]1a60-[***]4a-[***]ee-[***]08-[***]7079f"}])
2024-03-01T21:17:29.986Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]nsactioncreation-[***]GCOQ6/[***]fb80-[***]09-[***]ee-[***]18-[***]d842d"}])
2024-03-01T21:17:29.992Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]ransactionchange-[***]D1XM3/[***]2b40-[***]a3-[***]ee-[***]12-[***]428f3"}])
2024-03-01T21:17:29.995Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]arcreation-[***]64GU4P/[***]c730-[***]ad-[***]ee-[***]65-[***]0933d"}])
2024-03-01T21:17:30.002Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]inviteupdate-[***]D1PRB/[***]3d00-[***]bc-[***]ee-[***]64-[***]9917b"}])
2024-03-01T21:17:30.004Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]shareupdate-[***]FE93N/[***]86f0-[***]63-[***]ee-[***]f4-[***]1f6d3"}])
2024-03-01T21:17:30.006Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]tioncreation-[***]JUUEY/[***]1d30-[***]4a-[***]ee-[***]72-[***]c0927"}])
2024-03-01T21:17:30.008Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]ansactioncreation-[***]A9ZUEP/[***]ba30-[***]1d-[***]ee-[***]27-[***]779d1"}])
2024-03-01T21:17:30.010Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]esignup-[***]OY80R/[***]4f80-[***]ad-[***]ee-[***]03-[***]76c49"}])
2024-03-01T21:17:30.012Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]retoken-[***]BGIVZ/[***]2920-[***]ad-[***]ee-[***]c9-[***]b27d9"}])
2024-03-01T21:17:30.012Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]sactionchecker-[***]1ZVET/[***]a0d0-[***]7d-[***]ee-[***]f0-[***]05bed"}])
2024-03-01T21:17:30.013Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]61:stack/[***]ify-[***]aapps-[***]lop-[***]846-[***]nsactiontrigger-[***]8BHQ5/[***]dbf0-[***]7b-[***]ee-[***]f9-[***]15eb3"}])
2024-03-01T21:17:30.833Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]ify-[***]json","Bucket":"[***]ify-[***]aapps-[***]lop-[***]846-[***]ment"}])
2024-03-01T21:17:41.679Z|error : Received error [Error: Command failed with exit code 1: yarn --version
Usage Error: This project is configured to use npm

$ yarn ...] running command [yarn --version]
ShellCommandExecutionError: Received error [Error: Command failed with exit code 1: yarn --version
Usage Error: This project is configured to use npm

$ yarn ...] running command [yarn --version]
2024-03-01T21:20:46.863Z|info : amplify version core
2024-03-01T21:23:40.345Z|info : amplify diagnose core  {"send-report":true,"yes":false}
2024-03-01T21:23:40.413Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}

Additional information

I just don't understand why amplify is trying to run yarn. I don't have it. I had it in the past but not anymore!

Before submitting, please confirm:

  • 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.
@programad programad added the pending-triage Issue is pending triage label Mar 1, 2024
@ykethan
Copy link
Member

ykethan commented Mar 4, 2024

Hey @programad, thanks for reaching out. The amplify/backend/function/<function-name> should contain a amplify.state file with the build command for the function. you can modify the build command to use a different package manager. The file may be hidden on Vscode, in .vscode/setting.json set the amplify.state as false.

@ykethan ykethan added functions Issues tied to the functions category pending-response Issue is pending response from the issue author labels Mar 4, 2024
@ykethan
Copy link
Member

ykethan commented May 3, 2024

Closing the issue due to inactivity. Do reach out to us if you require any assistance.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Copy link

github-actions bot commented May 3, 2024

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.

@BalajiSriraman
Copy link

BalajiSriraman commented Jun 4, 2024

@ykethan this issue still persists even after changing the state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions Issues tied to the functions category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

3 participants