<#C01JG3B20RY|help> I'm running into some difficul...
# help
n
#help I'm running into some difficulty following the amplify tutorials but trying to update it for the latest SST version and using Vite. When I try to add the aws-amplify package to my frontend app, I get an error stating that "No matching version found for @aws-amplify/analytics@5.2.9." I notice that the latest version of aws-amplify is only a day old so I have rolled back to previous version (4.2.23) which installs fine. However, I now run into a new issue. As soon as I import Amplify as per
Copy code
import { Amplify } from 'aws-amplify';
I get the following error in my app.
Copy code
Uncaught ReferenceError: global is not defined
    at node_modules/buffer/index.js (index.js:43:30)
    at __require2 (chunk-ZVZOEM2G.js?v=9600c6f0:35:50)
    at AuthenticationHelper.js:5:24
Any ideas?
m
@Neil Balcombe this is a vite issue, in the frontend/index.html add this script
Copy code
<script>
      if (global === undefined) {
        var global = window;
        var global = alert;
      }
    </script>
n
Boom! Thank you.