Reduce error level of `blazor.web.js` does not exist errors
When building a fresh copy of the repo, I get errors about the Debug builds of the blazor.web.js file not being found because I have not run npm ci && npm run build on the repo. The message indicates that the check-in copy of the file will be used as a fallback.
/Users/captainsafia/git/aspnetcore/57112/src/Components/Endpoints/src/Microsoft.AspNetCore.Components.Endpoints.csproj(72,5): error : '../../Web.JS/dist/Debug/blazor.web.js' does not exist. Falling back to checked-in copy.
Because of our warn-as-errors configuration, this warning manifests as an error that breaks the build.
Can we add an exemption for this error to avoid erroneously warning on projects that don't need debug builds of blazor.web.js?
cc: @javiercn @wtgodbe since I'm not sure what the current status of the compiled JS scripts is
@captainsafia yes, let me see what we can do.
@wtgodbe has been changing stuff here. I'm not sure if this is new behavior or if we introduced a change on behavior that now triggers this.
@wtgodbe, would you be able to take a look at this?
@captainsafia does the same thing repro when building the release/8.0 branch?
@captainsafia does the same thing repro when building the
release/8.0branch?
It doesn't appear to repro on release/8.0 for me...
@captainsafia how are you reproducing this?
Were you missing node, npm on the machine or were you passing /p:NoBuildNodeJs=true explictily?
@javiercn Sorry it took me a while to get this notification!
I do have Node and NPM on my PATH:
$ node --version
v20.14.0
$ npm --version
10.7.0
I get the error when executing a plain old .build.sh on the src/Mvc directory for example:
$ cd src\Mvc
$ ./build.sh
...
Microsoft.AspNetCore.Components.Server failed with 16 error(s) (1.4s)
/Users/captainsafia/git/aspnetcore/iresult-bug/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj(110,5): error : '../../Web.JS/dist/Debug/blazor.server.js' does not exist. Falling back to checked-in copy.
...
I'm hitting this exact same thing. Looking at trying to test something out on another issue and I'm also trying to build.sh the Mvc project. This issue comes up when googling, so I know the answer is in Safia's original description above, but it was a bump in the road when you'd expect a clean build to be smooth sailing.
[I'm not sure why I'm on a road and sailing at the same time...]
We think that this is fixed, but if not, we can copilot it.