Closed rapgithub closed 2 years ago
I found a simple solution for those who seek and has the same problem!
Just add this line to your index.html at the bottom!
<script> var global = global || window; var Buffer = Buffer || []; var process = process || { env: { DEBUG: undefined }, version: [] }; </script>
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
REST API
Amplify Categories
auth
Environment information
Describe the bug
Using aws-amplify with my app project to connect to aws services like cognito and I have upgraded cordova version 11 and all libraries and modules and using
gives me now this error:
cordova version 11 uses now vite-config.js
How can I solve this using vite with amplify?
my package.json show this
any clues how to fix this issue or is it a bug? thanks
Expected behavior
no errors when using amplify and not getting ReferenceError: Can't find variable: global all the time!
Reproduction steps
npm start
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
iPhone 11
Mobile Operating System
iOS last version
Mobile Browser
browser
Mobile Browser Version
android 11
Additional information and screenshots
-