dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.42k stars 10k forks source link

@microsoft SignalR 8.0.9. Failed to resolve module specifier "module". Relative references must start with either "/", "./", or "../" #57145

Open siddiq-rehman opened 2 months ago

siddiq-rehman commented 2 months ago

Is there an existing issue for this?

Describe the bug

Hey @BrennanConroy /Team

I have been following up on this issue. This issue was resolved in 8.0.0.

I am using Angular17 / Webpack and doing module federation by sharing signalr and so, I see this as first line in the bundled signalr module,

import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";

When this file runs on browser, its thowing the error

Uncaught TypeError: Failed to resolve module specifier "module". Relative references must start with either "/", "./", or "../".

This is probably because of the below PR : PR:5529 which reverted this commit

Can you please help me with a work around for this issue?

Expected Behavior

This should not have node dynamic import releated code for angular broswer build.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

eposbg commented 2 months ago

I am having absolutely the same issue with the same setup. Angular 17, module federation with webpack, signalR package version 8.0.7. Any update?

zuccatoagustin84 commented 2 months ago

same problem, Angular 17, module federation with webpack, signalR package version 8.0.7. Any update?

RebockraAtAtos commented 2 months ago

Same problem with Angular 17, module federation with webpack and version 8.0.7. Please provide an update. How do we fix this?

RebockraAtAtos commented 2 months ago

Hello, unfortunately this is a blocking issue for our AI integration, since we want to be able stream model responses directly to the user interface. SignalR support for Angular is crucial to achieve this task. Please advise how to make it work for Angular 17 that is using module federation with webpack.

forefrontmartingrantz commented 1 month ago

I guess its because of this: https://github.com/dotnet/aspnetcore/issues/47674#issuecomment-2218136309

SanderBreivik commented 1 day ago

Any updates on this, we had to downgrade to 8.0.0 as a temp fix. @BrennanConroy I see that you pushed out the previous fix in 48154, is this something currently being looked at?