Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using alpinejs-ray via CDN #205

Open
bnzo opened this issue Jun 30, 2024 · 7 comments
Open

Error using alpinejs-ray via CDN #205

bnzo opened this issue Jun 30, 2024 · 7 comments

Comments

@bnzo
Copy link

bnzo commented Jun 30, 2024

Description

Unable to use alpinejs-ray via CDN shows the following error in the web inspector:

TypeError: Cannot read properties of undefined (reading 'randomUUID')

Steps To Reproduce

  1. Using the following file:
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/axios@latest/dist/axios.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/alpinejs-ray@2/dist/standalone.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js" defer></script>
</head>

<body>
    <div x-data>
        <button @click="$ray('hello from alpine')">Send to Ray</button>
    </div>
</body>

</html>
  1. Open it and click on Send to ray
  2. See the following screenshot of the web inspector
Screenshot 2024-06-30 at 15 06 06

Expected behavior

The web page should not have any errors and should communicate with Ray

Environment

  • OS: macOS 14.5
  • Browser: Chrome 126.0.6478.127 (Official Build) (arm64)

Additional context

Setting up a project with alpinejs-ray installed via npm works correctly.

@patinthehat
Copy link
Member

@bnzo thank you for reporting this, I'll look into it.

@longestdrive
Copy link

Wondering if there's an update on this issue as I have the same error message - very new to Ray so not sure whether installed correctly or how to resolve. Thank you :)

@stijntrinos
Copy link

Having the same issue as well. Can't seem to get it working in a Magento 2 Installation with a Hyva Theme.

@patinthehat
Copy link
Member

@longestdrive @stijntrinos @bnzo I'm actively working on a v3.0 which should resolve the issue. Thank you for your patience 👍

@patinthehat
Copy link
Member

You can see the progress in this PR.

@stijntrinos
Copy link

@patinthehat When do you think this version is availible?

@sitesurfer
Copy link

I am also getting this issue today (3/1/25), is there an obvious way to get the V3 update so that the UUID issue is fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants