aws-amplify / aws-amplify/amplify-cli
Unexpected argument *folder directory* when `amplify pull` is called in CLI
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### How did you install the Amplify CLI?
npm
### If applicable, what version of Node.js are you using?
18.16.0
### Amplify CLI Version
11.1.1
### 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.
No
### Describe the bug
Hello there,
After leaving it for about 2 weeks, I just returned to my amplify project and decided to make and deploy some changes to my data models in amplify console. After that, I called amplify pull and it gave an error message saying:
Command failed with exit code 64: /Users/*user name*/.amplify/lib/aws-amplify-a mplify-frontend-ios/resources/amplify-xcode import-config --path=/Users: *my project dir*
Error: Unexpected argument 'PROJECTS/eemo2'
Usage: amplify-xcode import-config [--path ]
See 'amplify-xcode import-config --help' for more information.
I did try running the `amplify-xcode import-config --help` as suggested by it could not recognize the command.
I also noticed that after running `amplify pull` the `amplify codegen`, that the only models that get generated are the ones that I created today. The ones created two weeks and later do not get generated.
I use amplify-swift, and Xcode is my IDE.
Thanks.
### Expected behavior
I expected it to pull without an error. This is the first time I am getting such error.
### Reproduction steps
1. Make some changes via amplify console
2. Call amplify pull
** I don't know if this is important to note but I left the project idle for about two weeks. I just revisited it today **
### Project Identifier
_No response_
### Log output
```
# Put your logs below this line
Command failed with exit code 64: /Users/*user name*/.amplify/lib/aws-amplify-a mplify-frontend-ios/resources/amplify-xcode import-config --path=/Users: *my project dir*
Error: Unexpected argument 'PROJECTS/eemo2'
Usage: amplify-xcode import-config [--path ]
See 'amplify-xcode import-config --help' for more information.
```
### Additional information
_No response_
### 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.
Contributor guide
Research direction
Start by reproducing `amplify pull` with Amplify CLI 11.1.1, Node.js 18.16.0, and the reported Mac setup, then trace the `amplify-xcode import-config --path` invocation shown in the log. Done means the pull accepts project paths containing the reported folder structure, completes without the unexpected-argument error, and generates all expected models.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, swift, typescript
- Domain
- cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100