Amplify / Vue3 / Vuetify missing 'global' variable - Uncaught ReferenceError: global is not defined #11423
Closed
3 tasks done
Labels
Core
Related to core Amplify issues
Before opening, please confirm:
JavaScript Framework
Vue
Amplify APIs
Not applicable
Amplify Categories
Not applicable
Environment information
Describe the bug
Starting server after boot strapping site with vuetify / vue / amplify, causes an error that prevents the site from loading. The error is in the aws packages.
Here's the file where it looks for the
global
variableHere's the auth module where it gets bundled from:
Note there is a previous ticket for this issue #678
You can see that recently a number of people have brought up this issue again, so it is a bug that is back.
The work around there by @mclean25 allowed me to load the site.
Found a better better fix for Vite Projects. Edit the vite.config.[js/ts] file with the following:
This issue should probably be opened again and resolved.
Expected behavior
The site should run after bootstrapping without amplify packages breaking the build.
Reproduction steps
Bootstrap
Add amplify to main.js
Run
Code Snippet
// Put your code below this line.
Log output
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
The text was updated successfully, but these errors were encountered: