amplify-cli: Installed amplify-cli and got this error: ENOENT: no such file or directory, ...team-provider-info.json'
@UnleashedMind I have just moved to a new machine and my project was running beautifully on the new machiine(with Api, Auth, Storage services via Amplify). I realised i needed to interact with amplify-cli, so I then installed npm install -g @aws-amplify/cli
. I ran amplify status
:
| Category | Resource name | Operation | Provider plugin |
| -------- | ------------- | --------- | ----------------- |
| Api | project | Update | awscloudformation | <-strangely updated?
| Auth | project837477 | No Change | awscloudformation |
| Storage | projectStorage | No Change | awscloudformation |
Strangely Api updated even though i’ve made no changes. Anyway, when i ran amplify push
, i got the following error.
An error occurred during the push operation: ENOENT: no such file or directory, team-provider-info.json'
. This file exists, just as it did in my project folder on my last machine.
Then i tried npm install -g @aws-amplify/cli@4.11.0
but still no luck to push. What on earth is going on? I’m paralyzed in my tracks right now and i have to kick on and complete this project. Please help!!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 28 (9 by maintainers)
Spent quite some time and I figured out where it is. There is a file called
local-env-info.json
where the path to the project is configured. This is the file which needs to be updated when the path of the repo change. Nowamplify push / publish
works again@chai86 Just try running
amplify configure project
. I believe the “projectPath” for your new machine would be different than your previous machine right?amplify configure project
should be able to rectify that.So the problem in my case it was I stoped the process in the middle causing a crash in amplify I deleted everything inside of /home/whatever/.nvm/versions/node/v12.18.4/lib/node_modules/@aws-amplify/ and reinstalled amplify, that worked
This is the problem for me, were you able to solve?
There’s no need to create restore point, when you clone your project to another dev machine, you just need to make sure that the new machine has the proper aws configuration files under ~/.aws, and then run
amplify pull
andamplify init
in sequence to setup your local development environments.@kaustavghosh06 I changed my “projectPath” to the one i was using before, but now when i run
amplify push
i get the error:When i run
amplify configure project
it’s like doing anamplify init
and building a project from scratch. I’m being asked:I also already have a region, username and accessKey, secretAccess key etc…
I do not want to replace or ruin anything in my current backend or current project! Should i continue this process/
amplify pull
?