aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.43k stars 2.13k forks source link

Error: No map resources found in amplify config #8911

Closed IsaacTrevino closed 3 years ago

IsaacTrevino commented 3 years ago

Before opening, please confirm:

JavaScript Framework

React

Amplify APIs

Geo

Amplify Categories

Geo

Environment information

``` # Put output below this line System: OS: Linux 4.19 Ubuntu 20.04.2 LTS (Focal Fossa) CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor Memory: 4.82 GB / 12.42 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node npm: 7.22.0 - ~/.nvm/versions/node/v14.17.0/bin/npm npmPackages: @apollo/client: ^3.4.11 => 3.4.11 @apollo/client/cache: undefined () @apollo/client/core: undefined () @apollo/client/errors: undefined () @apollo/client/link/batch: undefined () @apollo/client/link/batch-http: undefined () @apollo/client/link/context: undefined () @apollo/client/link/core: undefined () @apollo/client/link/error: undefined () @apollo/client/link/http: undefined () @apollo/client/link/persisted-queries: undefined () @apollo/client/link/retry: undefined () @apollo/client/link/schema: undefined () @apollo/client/link/utils: undefined () @apollo/client/link/ws: undefined () @apollo/client/react: undefined () @apollo/client/react/components: undefined () @apollo/client/react/context: undefined () @apollo/client/react/data: undefined () @apollo/client/react/hoc: undefined () @apollo/client/react/hooks: undefined () @apollo/client/react/parser: undefined () @apollo/client/react/ssr: undefined () @apollo/client/testing: undefined () @apollo/client/utilities: undefined () @apollo/client/utilities/globals: undefined () @babel/cli: ^7.15.4 => 7.15.4 @babel/core: ^7.15.5 => 7.15.5 (7.12.3) @babel/preset-env: ^7.15.6 => 7.15.6 (7.12.1) @date-io/dayjs: ^1.3.13 => 1.3.13 @fortawesome/fontawesome-svg-core: ^1.2.36 => 1.2.36 @fortawesome/free-brands-svg-icons: ^5.15.4 => 5.15.4 @fortawesome/free-regular-svg-icons: ^5.15.4 => 5.15.4 @fortawesome/free-solid-svg-icons: ^5.15.4 => 5.15.4 @fortawesome/react-fontawesome: ^0.1.15 => 0.1.15 @fullcalendar/core: 5.9.0 => 5.9.0 @fullcalendar/daygrid: 5.9.0 => 5.9.0 @fullcalendar/interaction: 5.9.0 => 5.9.0 @fullcalendar/list: 5.9.0 => 5.9.0 @fullcalendar/react: 5.9.0 => 5.9.0 @fullcalendar/timegrid: 5.9.0 => 5.9.0 @fullcalendar/timeline: 5.9.0 => 5.9.0 @lottiefiles/react-lottie-player: ^3.4.1 => 3.4.1 @maplibre/maplibre-gl-geocoder: ^1.1.0 => 1.1.0 @maplibre/maplibre-gl-style-spec: 14.1.0-dev @material-ui/core: ^4.12.3 => 4.12.3 @material-ui/icons: ^4.11.2 => 4.11.2 @material-ui/lab: ^4.0.0-alpha.60 => 4.0.0-alpha.60 @material-ui/pickers: ^3.3.10 => 3.3.10 @material-ui/styles: ^4.11.4 => 4.11.4 @react-pdf/renderer: ^2.0.19 => 2.0.19 @stripe/react-stripe-js: ^1.4.1 => 1.4.1 @stripe/stripe-js: ^1.17.1 => 1.17.1 apexcharts: ^3.28.1 => 3.28.1 apollo-cache-persist: ^0.1.1 => 0.1.1 aws-amplify: 4.2.1-geo.23 => 4.2.1-geo.23+c4fe1c46f aws-appsync-auth-link: ^3.0.6 => 3.0.6 aws-appsync-subscription-link: ^3.0.8 => 3.0.8 axios: ^0.21.4 => 0.21.4 change-case: ^4.1.2 => 4.1.2 clsx: ^1.1.1 => 1.1.1 dayjs: ^1.10.7 => 1.10.7 draft-js: ^0.11.7 => 0.11.7 draft-js-export-html: ^1.4.1 => 1.4.1 formik: ^2.2.9 => 2.2.9 graphql: ^15.5.3 => 15.5.3 (14.0.0) js-cookie: ^3.0.1 => 3.0.1 (2.2.1) jss: ^10.7.1 => 10.7.1 localforage: ^1.10.0 => 1.10.0 lodash: ^4.17.21 => 4.17.21 maplibre-gl: ^1.15.2 => 1.15.2 maplibre-gl-js-amplify: github:IsaacTrevino/maplibre-gl-js-amplify => 1.1.0 mime-types: ^2.1.32 => 2.1.32 notistack: ^1.0.10 => 1.0.10 nprogress: ^0.2.0 => 0.2.0 omit-deep-lodash: ^1.1.5 => 1.1.5 print-js: ^1.6.0 => 1.6.0 prop-types: ^15.7.2 => 15.7.2 react: ^17.0.2 => 17.0.2 react-apexcharts: ^1.3.9 => 1.3.9 react-color: ^2.19.3 => 2.19.3 react-dom: ^17.0.2 => 17.0.2 react-draft-wysiwyg: ^1.14.7 => 1.14.7 react-dropzone: ^11.4.0 => 11.4.0 react-feather: ^2.0.9 => 2.0.9 react-helmet: ^6.1.0 => 6.1.0 react-json-tree: ^0.15.0 => 0.15.0 react-number-format: ^4.7.3 => 4.7.3 react-perfect-scrollbar: ^1.5.8 => 1.5.8 react-router-dom: ^5.3.0 => 5.3.0 react-scripts: ^4.0.3 => 4.0.3 uuid: ^8.3.2 => 8.3.2 (3.4.0, 3.3.2) video.js: ^7.15.4 => 7.15.4 yup: ^0.32.9 => 0.32.9 npmGlobalPackages: @aws-amplify/cli: 5.6.0-geo.1 amplify-category-video: 3.8.2 npm-check-updates: 11.8.5 npm: 7.22.0 typescript: 4.4.2 ```

Describe the bug

I receive an error upon installing aws-amplify@geo version 23: Error: No map resources found in amplify config, run 'amplify add geo' to create them and ensure to runamplify pushafter

This may be related to the issue https://github.com/aws-amplify/amplify-js/issues/8687, however, this new issue is not reading the awsconfig file geo section.

Expected behavior

Allow the use of Amplify@geo and amazon location services.

Reproduction steps

npm i --save-exact aws-amplify@geo

Amplifiyer commented 3 years ago

@IsaacTrevino we had a breaking change released 2 days ago https://github.com/aws-amplify/amplify-js/blob/geo/main/packages/geo/CHANGELOG.md and will require updated @amplify/cli of geo tag and running amplify push again to regenerate the aws_exports file. @TreTuna

IsaacTrevino commented 3 years ago

Okay big breaking changes due to amplify cli 5.6.0! My cloudfront distribution was completely reset, however geo is now working thank you. (for those who attempt this update and use CloudFront for hosting s3 bucket)

Steps to fix CloudFront

Steps to fix Amplify/Geo changes

awsconfig.amazon_location_services -> awsconfig.amazon_location_service

I will be closing this issue.

phani-srikar commented 3 years ago

Thanks for bringing this up. Please run amplify push --force to update the aws-exports file. So no manual change is needed.

github-actions[bot] commented 2 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 or Discussions for those types of questions.