-
Notifications
You must be signed in to change notification settings - Fork 26
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
Problem with using Vite + Vue #48
Comments
me too |
My guess is this is due to the dependencies (get pixels, save pixels) relying on node.js packages built into browserify, webpack etc and perhaps they're not supported by vite. Really wild guess, I'm not sure. |
The following information is key to resolving this issue:
save-pixels-jpeg-js-upgrade.js?v=88a5b38b:39 Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter" in client code. See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details. |
I downloaded https://unpkg.com/[email protected]/dist/gif-frames.min.js locally, put it into my project, and then introduced it in index.html, and the problem was solved <script src="/src/js/gif-frames.min.js"></script>Note that package.json does not need to introduce "gif-frames": "^1.0.1" again |
I guess Vite doesn't handle UMDs
Ben
Le lun. 18 déc. 2023, 4 h 17 a.m., Oliver ***@***.***> a
écrit :
… I downloaded ***@***.***/dist/gif-frames.min.js
locally, put it into my project, and then introduced it in index.html, and
the problem was solved
<script src="/src/js/gif-frames.min.js"></script>
Note that package.json does not need to introduce "gif-frames": "^1.0.1"
again
—
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADHOD3NS6JBUQF2PVADNPTTYKAC2LAVCNFSM6AAAAAAWODV3JCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZHA3DOOJQGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I get this error and I'm not really sure how to fix it, although it seems similar to #37. For reference all I'm doing is importing gif-frames, I'm not doing anything else at the moment.
The text was updated successfully, but these errors were encountered: