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

Allow Usage from CDN #13

Open
anthumchris opened this issue Jun 9, 2020 · 1 comment
Open

Allow Usage from CDN #13

anthumchris opened this issue Jun 9, 2020 · 1 comment

Comments

@anthumchris
Copy link
Owner

When referencing statically from a CDN like https://unpkg.com/opus-stream-decoder, the WASM file fetch fails because of the relative URL used to fetch.

<script src="https://unpkg.com/opus-stream-decoder@1.2.7/dist/opus-stream-decoder.js"></script>
@dy
Copy link

dy commented Dec 30, 2022

+1:

✘ [ERROR] Could not resolve "fs"

    node_modules/opus-stream-decoder/dist/opus-stream-decoder.mjs:9:1260:
      9 │ ...ry){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=requir...
        ╵                                  ~~~~

  The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "--platform=node" to do that, which will remove this error.

✘ [ERROR] Could not resolve "path"

    node_modules/opus-stream-decoder/dist/opus-stream-decoder.mjs:9:1296:
      9 │ ...f(!nodePath)nodePath=require("path");filename=nodePath["normaliz...
        ╵                                 ~~~~~~

  The package "path" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "--platform=node" to do that, which will remove this error.

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

No branches or pull requests

2 participants