awslabs / amplify-mobilehub-migrator

A plugin to migrate existing AWS Mobile Hub projects to be used with the Amplify CLI
https://amplify.aws
Apache License 2.0
13 stars 8 forks source link

Error during import #7

Closed sadooghi closed 5 years ago

sadooghi commented 5 years ago

I've followed the steps in the document for importing resources however during the last step: amplify mobilehub import I place in my project-id correctly here but I get the following error after running the command: An error occurred trying to run the command Cannot read property 'name' of undefined.

My Project-id is: c8900804-9dd8-47ff-84bf-9351bb6aa535

swaminator commented 5 years ago

@sadooghi can you share what resources you have enabled in your Mobile Hub project?

sadooghi commented 5 years ago

@swaminator user sign-in, noSQL DB, cloudlogic, user file storage

nimacks commented 5 years ago

@sadooghi , we've published a new version of the migrator. Please uninstall npm uninstall -g amplify-mobilehub-migrator and re-install this plugin. You can then run the import command again and share the full stack trace of the error you're seeing.

swaminator commented 5 years ago

@sadooghi following up here.

borch84 commented 5 years ago

Hi @swaminator I am trying to import my mobile hub project to amplify but I am getting this error:

$ amplify mobilehub import 87ab2495-e234-4a7a-bc2b-39b842d4ab7d There was an error importing your Mobile Hub project: context.amplify.pathManager.getProviderInfoFilePath is not a function

I wonder if I must configure something else? I've already installed amplify with:

npm install -g @aws-amplify/cli & npm i -g amplify-mobilehub-migrator

nimacks commented 5 years ago

@borch84,

borch84 commented 5 years ago

Hi @nimacks I have enabled:

Ampify version:

$ npm list -g --depth=0 /home/borch/.npm-global/lib ├── @aws-amplify/cli@1.1.7 ├── amplify-mobilehub-migrator@1.0.5 ├── awsmobile-cli@1.1.7 └── expo-cli@2.11.9

npm ERR! peer dep missing: graphql@^0.11.0 || ^0.12.0 || ^0.13.0, required by graphql-import@0.4.5 npm ERR! peer dep missing: typescript@*, required by ts-pnp@1.0.1

The file is created inside amplify folder:

$ ls -l amplify/team-provider-info.json -rw-r--r-- 1 borch borch 1462 Mar 13 22:40 amplify/team-provider-info.json

nimacks commented 5 years ago

Thanks @borch84, we're investigating.

rush86999 commented 5 years ago

I have the same exact issue: features I have enabled

  1. user sign-in
  2. hosting
  3. s3 file storage
/usr/local/lib
├── @aws-amplify/cli@1.1.7
├── amplify-mobilehub-migrator@1.0.5
├── babel-eslint@8.2.4
├── create-react-app@1.5.2
├── create-react-native-app@1.0.0
├── UNMET PEER DEPENDENCY eslint@5.8.0
├── eslint-plugin-react@7.9.1
├── exp@49.2.2
├── firebase-tools@3.17.4
├── grommet@1.11.0
├── n@2.1.12
├── npm@6.1.0
├── nsp@3.2.1
├── UNMET PEER DEPENDENCY react@>= 15.3.0 < 16 || 16.x
├── UNMET PEER DEPENDENCY react-dom@>= 15.3.0 < 16 || 16.x
├── react-native-cli@2.0.1
├── react-native-photo-view@1.5.2
├── serverless@1.37.1
├── snyk@1.88.0
└── typescript@2.9.2

my team-provider-info.json starts with NONE

I also have dynamodb and appsync but they were manually configured

There was an error importing your Mobile Hub project: Cannot read property 'name' of undefined
An error occured trying to run the command TypeError: Cannot read property 'name' of undefined
sadooghi commented 5 years ago

@sadooghi following up here.

Was away last week. This is what I get: ✖ There was an error importing your Mobile Hub project: Cannot read property 'name' of undefined An error occured trying to run the command TypeError: Cannot read property 'name' of undefined

hedgeek commented 5 years ago

I am having the same issue as well × There was an error importing your Mobile Hub project: Cannot read property 'name' of undefined An error occured trying to run the command TypeError: Cannot read property 'name' of undefined

I have the following features enabled user sign-in cloud logic hosting and streaming no-sql database

+-- @aws-amplify/cli@1.1.7 +-- amplify-mobilehub-migrator@1.0.5 +-- awsmobile-cli@1.1.7 +-- graphql@14.1.1 `-- npm@6.9.0

swaminator commented 5 years ago

@hedgeek @sadooghi @borch84 we would like to get on a call with you to see if we can better understand your Mobile hub setup in order to diagnose the issue. Please email aws-amplify-customer@amazon.com with 30 min availability slots this week and we'll set something up. We are based in Seattle Pacific time for your reference.

borch84 commented 5 years ago

Hi @swaminator my time zone is GMT-6, please let me know when you plan to schedule the call so I shall attend. Already sent an email to aws-amplify-customer@amazon.com. Thanks.

hedgeek commented 5 years ago

@nimacks Confirmed the update has fixed my issue. Great work and many thanks!

swaminator commented 5 years ago

@borch84 please check if the update has fixed your issue.

sadooghi commented 5 years ago

@swaminator mine says import successful now. Thanks