-
Notifications
You must be signed in to change notification settings - Fork 10k
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
signalr 8 / Angular: The package "url" wasn't found on the file system but is built into node #52082
Comments
Could you give more exact repro instructions? I made a new angular app, added the code you showed, and added |
Just run Interesting thing: |
I have exact same problem. I have pinpointed @microsoft/signalr version 8 to be causing problem. Using previous versions works fine. For this kind of a simple app just changing builder line in angular.json to @angular-devkit/build-angular:application should be sufficient. |
Normally, if he creates his application using angular cli 17, esbuild is enabled by default and he should be able to reproduce the issue without updating the angular.json. |
Same error here ... Strange Fact is that yesterday I upgraded an existing Mico Frontend and every worked fine ... Even tried to scaffold a new project and copied the component implementation and NOT any metadata file. My project also included the @microsoft/signalr package ... downgrade to 7.0.14 solved the issue |
Two workarounds I've come up with so far:
to your package.json
Obviously these aren't great. But it should mitigate the problem while I look into why the new esbuild builder in angular 17 isn't working here. |
Thats not really a workaround though. Thats just falling back to webpack instead of esbuild. I've tracked it down, and the same issue is there aswell for and seems to stem from |
Same here and we also use vite builder with Angular 17 (builder": "@angular-devkit/build-angular:application") and want to keep them. With "@microsoft/signalr": "8.0.0" the error cames up And the same as above, ng serve works fine with both versions, only the build fails. |
I've encountered the same problem as well |
I am facing the same issue as well. As of now downgraded to v7 |
@BrennanConroy Hi Brennan, do you have any news about this? This seems to be a pretty blocking issue as it simply prevents the migration towards .NET 8. I know that you provided a workaround using webpack but this is clearly suboptimal as new application created with angular CLI 17 opt for esbuild. Moreover, every post about ng 17 advice people to start using esbuild instead of webpack (for good reasons). Any update would be appreciated <3 |
No updates. Also, I gave two workarounds, one of which lets you keep using esbuild. I have no idea how angular build works, but my assumption is that angular isn't reading the package.json "browser" section for projects (like signalr) which bring in other dependencies that aren't used in the browser, so it will end up trying to use those dependencies (eventsource) and errors because it's primarily a node package. The other problem is that the eventsource package looks a bit unmaintained and has an open issue about making it more friendly when being referenced in a react-native build, which has a similar error about not resolving "url". |
Oops, sorry, read too fast your workaround post. I'll use this waiting for the final fix. Thanks and good luck :-) |
Maybe this is the Problem:
|
same problem here.. i guess ill be downgrading, version 7.0.12 build fine |
Hi, the solution proposed by @BrennanConroy here worked for me waiting for a better solution. |
I don't really know anything about esbuild or webpack or anything, but which of your solutions does let us keep using esbuild? |
The first one, where you add
in you package.json |
I think it has to do with Node.js and the typings for Node.js As Angular is a client only framework, there should be no references to Node.js in any way, so they removed them from Webpack. Angular also doesn't include the typings for node.js anymore. As you see here SignalR package, the node typings are included. I didn't have time to test different scenarios. UPDATE: After checking some code in the client package, I found many references to node.js. Problem seems to be more that in the SignalR client package every scenario is included in the same package / code base. So, dropping Node.js references will be difficult. |
I'm using angular 17 |
So there is no fix for this yet as I am facing the same? |
@rishabhbeni I just downgraded to V7 until it's fixed. Haven't had any problems on functionality. |
Or you can use the workaround proposed here: |
Same here... keeping 7.0.14... waiting for updates! |
Same problem here :( |
I am facing the same problem... |
Same here. Stuck in 7.0.14 |
Same here, we are stuck in 7.0.14 |
Respectfully, folks - 35 of us are subscribed and get a notification each time someone says "same here" which doesn't actually give any sense of priority to the team on this issue. We're all in the same boat and are stuck in 7.0.14 - instead of commenting to let everyone know, the best thing you can do is upvote the first comment |
Moreover, as mentioned multiple time, there is a workaround involving 5 lines of code in the packages.json that fix the issue. I'm using it for months in production and there is no problem with it, so I don't get why everyone chooses to ignore this solution... |
use this package for your angular project
|
Related issue: dotnet/aspnetcore#52082
I was having the same issue, but finally I found another way to fix it. In "externalDependencies": [
"http",
"https",
"url",
"util",
"net"
], This should fix the errors. However, you might still have some commonJsDependencies warnings. To fix this, add: "allowedCommonJsDependencies": [
"tough-cookie",
"node-fetch",
"fetch-cookie",
"abort-controller",
"ws",
"eventsource"
], |
Encountered this issue: "@microsoft/signalr": "^8.0.0", I have downgraded for now, but should really be fixed. |
Still the same issue. Applied the fix from @jjmhalew, this works fine on my end. My versions:
|
The solution from @jjmhalew works fine. Thank you! |
I was having the same problem in a Angular 18 application with SignalR 8.
Although I don't understand exactly what this does or how it resolves the issue. I think the ideal solution would something similar to @McGiogen suggestion. |
Same issue on my site! => Downgrade to 7.0.14 and waiting for a fix! Should be fixed, after this issue is more than half a year old. |
[like] Joel Fjordén reacted to your message:
…________________________________
From: Stephan Müller ***@***.***>
Sent: Tuesday, June 18, 2024 8:01:14 AM
To: dotnet/aspnetcore ***@***.***>
Cc: Joel Fjordén ***@***.***>; Manual ***@***.***>
Subject: Re: [dotnet/aspnetcore] signalr 8 / Angular: The package "url" wasn't found on the file system but is built into node (Issue #52082)
Same issue on my site! => Downgrade to 7.0.14 and waiting for a fix!
Should be fixed, after this issue is more than half a year old.
—
Reply to this email directly, view it on GitHub<#52082 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAZEZZJKNA5MMZZLF5X3WQ3ZH7SMVAVCNFSM6AAAAAA7MQYRHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZVGQ2TINBWGQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Sorry this took so long, 8.0.7 (out now) should contain a fix for this so any workarounds listed above can now be removed. |
Can confirm that the |
Thank you! |
From looking at the files changed between v8.0.6 and v8.0.7, it looks like it was #55229. |
8.0.7 resolves the issue for me. |
Updated and verified. Fixed with v8.0.7 |
**Configure production build environment** - Downgraded microsoft/signalr from v8 to v7.0.14 to fix [Build Error](dotnet/aspnetcore#52082). - Increase production budget size to 3mb. Related work items: #32507
Is there an existing issue for this?
Describe the bug
I have an Angular application using es-build that works perfectly fine with @microsoft/signalr@7.0.12 but fails to compile with @microsoft/signalr@8.0.0 with the following issues:
Note that I'm building a web application, so not something "for node".
Expected Behavior
The build should succeed as it does with the version 7.0.12.
Steps To Reproduce
Exceptions (if any)
.NET Version
8.0.100
Anything else?
IDE: vscode
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.8d38d0cc
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100\
.NET workloads installed:
Workload version: 8.0.100-manifests.8d38d0cc
There are no installed workloads to display.
Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71
.NET SDKs installed:
8.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
The text was updated successfully, but these errors were encountered: