aws-amplify / amplify-cli

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

Unable to pull a backend env created by the amplify console (EPERM: operation not permitted) #6138

Closed lebull closed 3 years ago

lebull commented 3 years ago

This is happening on Windows.

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker

Describe the bug A clear and concise description of what the bug is.

Pulling env created by the amplify console results in a permissions error

+ @aws-amplify/cli@4.38.2
added 45 packages from 20 contributors, updated 51 packages and moved 2 packages in 26.651s
PS C:\Users\me\Projects\proj> amplify pull --appId <app_id>--envName dev
Initializing new Amplify CLI version...
Done initializing new version.
Scanning for plugins...
Plugin scan successful
EPERM: operation not permitted, rename 'C:\Users\me\Projects\proj\amplify' -> 'C:\Users\me\Projects\proj\amplify-backup'

Amplify CLI Version You can use amplify -v to check the amplify cli version on your system

To Reproduce Steps to reproduce the behavior or terminal output if applicable

Additional context Add any other context about the problem here.

I originally had this pointed to another amplify project in another branch, so maybe something wanky happened with the cli's config? But I'm reproducing this after creating a fresh clone on a different machine where there was never a reference to the other project.

attilah commented 3 years ago

@lebull thanks for reporting the issue we're aware of this and it will be fixed in the next release.

lebull commented 3 years ago

4.39 seemed to resolve this issue.

ammarkarachi commented 3 years ago

@lebull Thanks for checking

berbaroovez commented 3 years ago

Im getting this issue on 4.39

`amplify pull

Pre-pull status:

Current Environment: staging

Category Resource name Operation Provider plugin
Api OperationCookies No Change awscloudformation

/ Fetching updates to backend environment: staging from the cloud.Could not initialize 'staging': EPERM: operation not permitted, stat 'C:\Users\Berbaroovez\Desktop\ReactProjects\cookiemanager\amplify\backend'`

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.