You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On which framework/platform are you having an issue?
React
Which UI component?
Other
How is your app built?
Create React App --template typescript
What browsers are you seeing the problem on?
Firefox, Chrome
Please describe your bug.
Integrating MapView component into my React typescript application works perfect with localhost but gives me an error of "ReferenceError: g is not defined" on my amplify website and am unable to view the map on my amplify domain.
import { MapView } from '@aws-amplify/ui-react';
import { Authenticator } from '@aws-amplify/ui-react';
import '@aws-amplify/ui-react/styles.css';
import awsExports from './aws-exports';
Amplify.configure(awsExports);
export default function App() {
return (
<Authenticator>
{({ signOut, user }) => (
<main>
<MapView />
<button onClick={signOut}>Sign out</button>
</main>
)}
</Authenticator>
);
}
@Noorbakht ! We found this is related to a known issue with maplibre library . It sometimes appears as Uncaught ReferenceError: _wrapNativeSuper is not defined or as ReferenceError: g is not defined Or y is not defined.
To fix this issue it's recommended to change your package.json browserslist definition for production as seen below:
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Other
How is your app built?
Create React App --template typescript
What browsers are you seeing the problem on?
Firefox, Chrome
Please describe your bug.
Integrating MapView component into my React typescript application works perfect with localhost but gives me an error of "ReferenceError: g is not defined" on my amplify website and am unable to view the map on my amplify domain.
What's the expected behaviour?
No error and a view of the map on the website.
Help us reproduce the bug!
package.json file:
Code Snippet
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: