Closed lloydwatkin closed 2 days ago
Hi @lloydwatkin thanks for opening this issue. Could you explain what are these import paths?
import { Amplify } from 'https://cdn.jsdelivr.net/npm/aws-amplify@6.9.0/+esm'
import { events } from 'https://cdn.jsdelivr.net/npm/aws-amplify@6.9.0/data/+esm'
As far as I know, Amplify JS v6 doesn't support use as CDN hosted JS bundles.
@HuiSF linked from https://www.jsdelivr.com/package/npm/aws-amplify
It seems to mostly work fine up until the above error. The files are compiled from parcel
for the browser which is able to pull down the libraries and build.
Hi @lloydwatkin thanks for the explanation. We've not tested Amplify JS library with CDN hosted bundles. We recommend you to use a npm package manager to install the Amplify dependencies into your project.
@HuiSF thanks, I've switched to compiling the Javascript and have hit another issue. I'll raise a new bug that.
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
Not applicable
Amplify Version
v6
Amplify Categories
auth
Backend
Amplify Gen 2
Environment information
Describe the bug
Instantiating Amplify in the browser (latest Chrome) leads to error:
This is my entire code base:
Expected behavior
Loads ok.
I'm trying to use the Events API
Reproduction steps
Included above
Code Snippet
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