amplify-cli
amplify-cli copied to clipboard
Amplify insist in trying to use yarn. But I don't even have yarn installed (i had in the past)!
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.
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:
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
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.
Closing the issue due to inactivity. Do reach out to us if you require any assistance.
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.
@ykethan this issue still persists even after changing the state