No map resources found in amplify config
See original GitHub issueBefore opening, please confirm:
- I have searched for duplicate or closed issues and discussions.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
React
Amplify APIs
Geo
Amplify Categories
geo
Environment information
# Put output below this line
amplify cli version - 4.6.0
npm aws-amplify version - 4.3.0
amplify status -
ββββββββββββ¬βββββββββββββββββββββββ¬ββββββββββββ¬ββββββββββββββββββββ
β Category β Resource name β Operation β Provider plugin β
ββββββββββββΌβββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Auth β demoselready58be52e5 β No Change β awscloudformation β
ββββββββββββΌβββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Api β demoselready β No Change β awscloudformation β
ββββββββββββΌβββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Storage β demoselreadystorage β No Change β awscloudformation β
ββββββββββββΌβββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Function β createUser β No Change β awscloudformation β
ββββββββββββΌβββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Function β requestResetPassword β No Change β awscloudformation β
ββββββββββββΌβββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Geo β lmsMap β No Change β awscloudformation β
ββββββββββββ΄βββββββββββββββββββββββ΄ββββββββββββ΄ββββββββββββββββββββ
-- aws-exports.js
"geo": {
"amazon_location_service": {
"region": "us-east-1",
"maps": {
"items": {
"lmsMap-uatenv": {
"style": "VectorEsriLightGrayCanvas"
},
"map32a03f17-uatenv": {
"style": "VectorEsriStreets"
}
},
"default": "map32a03f17-uatenv"
}
}
},
Describe the bug
No map resources found in amplify config, run βamplify add geoβ to create them and ensure to run amplify push
after
at AmazonLocationServiceProvider._verifyMapResources (AmazonLocationServiceProvider.js:273)
at AmazonLocationServiceProvider.getDefaultMap (AmazonLocationServiceProvider.js:113)
at GeoClass.getDefaultMap (Geo.js:140)
at eval (AmplifyMapLibreRequest.js:105)
at Generator.next (<anonymous>)
at eval (AmplifyMapLibreRequest.js:14)
at new Promise (<anonymous>)
at __awaiter (AmplifyMapLibreRequest.js:10)
at Function.AmplifyMapLibreRequest.createMapLibreMap (AmplifyMapLibreRequest.js:103)
at eval (AmplifyMapLibreRequest.js:113)
at Generator.next (<anonymous>)
at eval (AmplifyMapLibreRequest.js:14)
at new Promise (<anonymous>)
at __awaiter (AmplifyMapLibreRequest.js:10)
at createMap (AmplifyMapLibreRequest.js:112)
at eval (EventMap.tsx:57)
Expected behavior
I am trying to render maps
Reproduction steps
- Install aws-amplify
- setup geo-map modules
- try to render map in DOM
Code Snippet
// Put your code below this line.
Log output
// Put your logs below this line
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
This may be resolved at this point with newer versions, but we did have some versions where this issue turned up with the most common reasoning being that two versions of
@aws-amplify/geo
are being installed. You can either look in yournode_modules
(you may also want to checknode_modules/aws-amplify/node_modules
andnode_modules/maplibre/node_modules
) to see if another version is there) or the lock file for whichever package manager you are using, to verify if two versions being installed. If not, can you please let us know what versions for the following packages you have:aws-amplify
@aws-amplify/geo
maplibre-gl-js-amplify
I am also facing the exact same issue. To me it started when installing new versions of maplibre-gl and maplibre-gl-js-amplify to: βmaplibre-glβ: β^2.1.9β βmaplibre-gl-js-amplifyβ: β^2.0.0β from using version that were on ^1.15.3 and ^1.5.0.
I need to upgrade to be able to use GeoFencing. Before the upgrade loading maps worked great.
Trying to remove node_modules and lock file and then doing an npm install donβt help. Still get the same error.
Update Maybe I spoke to soon. Actually when I made sure that the lock file was deleted and all node_modules deleted and then doing npm install I got everything to work again with the updated versions.