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

[BUG] - @epicgames-ps/lib-pixelstreamingfrontend-ue5.5 is including EventEmitter, which causes build problems #328

Closed
leon opened this issue Nov 25, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@leon
Copy link

leon commented Nov 25, 2024

UE Version:
E.g. UE 5.5.0

Frontend Version:
E.g. UE5.5-0.3.2

Problem component
E.g. Frontend

Description
I have a very simple vite project that is importing

import {
	Config,
	PixelStreaming,
} from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5';

I tried upgrading from v 2.1.0 to 0.3.2 but I'm now getting Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter"...

The problem seems to be that @epicgames-ps+lib-pixelstreamingcommon-ue5.5 WebSocketTransport.js is getting included in the frontend code and it uses nodes EventEmitter, which is a node only library.

Steps to Reproduce:
create a new vite project
use v0.3.2
try building

here is a repo that you can test out
https://github.com/leon/bug-pixelstreaming-eventemitter

Expected behavior
Should be able to build frontend using 5.5 v0.3.2

Screenshots
If applicable, add screenshots to help explain your problem.

Platform (please complete the following information):
MacOS Sequoia

@leon leon added the bug Something isn't working label Nov 25, 2024
@lukehb
Copy link
Contributor

lukehb commented Nov 25, 2024

Thanks for reporting, I will look into this today.

@lukehb
Copy link
Contributor

lukehb commented Nov 26, 2024

Working on a PR - should have it fixed tomorrow: #330

@lukehb
Copy link
Contributor

lukehb commented Nov 28, 2024

If you try bumping to the latest (0.4.0) @epicgames-ps/lib-pixelstreamingfrontend-ue5.5 it should be fixed for you (I tested against your provided repo and it built).

@lukehb lukehb closed this as completed Nov 28, 2024
@leon
Copy link
Author

leon commented Dec 2, 2024

Hey,

Just wanted to mention that 0.4.0 is not tagged as the latest release on npm
https://www.npmjs.com/package/@epicgames-ps/lib-pixelstreamingfrontend-ue5.5?activeTab=versions

@mcottontensor
Copy link
Collaborator

Yeah thats because I had to push a fix for the 0.3.x version.
@lukehb You might be able to make it as latest, but I don't have direct perms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants