question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`-no-build-nodejs` without `/p:SkipTestBuild=true` fails build

See original GitHub issue

I accidentally hit this in #21487. See https://dev.azure.com/dnceng/public/_build/results?buildId=974989 for example. The following errors occur in that build

/datadisks/disk1/workspace/_work/1/s/.dotnet/sdk/6.0.100-preview.1.21073.4/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/targets/Microsoft.NET.Sdk.BlazorWebAssembly.Current.targets(258,5): error MSB3954: Failed to compute hash for file '/datadisks/disk1/workspace/_work/1/s/src/Components/Web.JS/dist/Release/blazor.webassembly.js' because it does not exist or is inaccessible. [/datadisks/disk1/workspace/_work/1/s/src/Components/WebAssembly/testassets/StandaloneApp/StandaloneApp.csproj]
/datadisks/disk1/workspace/_work/1/s/.dotnet/sdk/6.0.100-preview.1.21073.4/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/targets/Microsoft.NET.Sdk.BlazorWebAssembly.Current.targets(258,5): error MSB3954: Failed to compute hash for file '/datadisks/disk1/workspace/_work/1/s/src/Components/Web.JS/dist/Release/blazor.webassembly.js' because it does not exist or is inaccessible. [/datadisks/disk1/workspace/_work/1/s/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/Wasm.Authentication.Client.csproj]
/datadisks/disk1/workspace/_work/1/s/.dotnet/sdk/6.0.100-preview.1.21073.4/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/targets/Microsoft.NET.Sdk.BlazorWebAssembly.Current.targets(258,5): error MSB3954: Failed to compute hash for file '/datadisks/disk1/workspace/_work/1/s/src/Components/Web.JS/dist/Release/blazor.webassembly.js' because it does not exist or is inaccessible. [/datadisks/disk1/workspace/_work/1/s/src/Components/WebAssembly/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj]
/datadisks/disk1/workspace/_work/1/s/.dotnet/sdk/6.0.100-preview.1.21073.4/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/targets/Microsoft.NET.Sdk.BlazorWebAssembly.Current.targets(258,5): error MSB3954: Failed to compute hash for file '/datadisks/disk1/workspace/_work/1/s/src/Components/Web.JS/dist/Release/blazor.webassembly.js' because it does not exist or is inaccessible. [/datadisks/disk1/workspace/_work/1/s/src/Components/WebAssembly/testassets/CustomBasePathApp/CustomBasePathApp.csproj]
/datadisks/disk1/workspace/_work/1/s/.dotnet/sdk/6.0.100-preview.1.21073.4/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/targets/Microsoft.NET.Sdk.BlazorWebAssembly.Current.targets(258,5): error MSB3954: Failed to compute hash for file '/datadisks/disk1/workspace/_work/1/s/src/Components/Web.JS/dist/Release/blazor.webassembly.js' because it does not exist or is inaccessible. [/datadisks/disk1/workspace/_work/1/s/src/Components/benchmarkapps/Wasm.Performance/TestApp/Wasm.Performance.TestApp.csproj]
/datadisks/disk1/workspace/_work/1/s/.dotnet/sdk/6.0.100-preview.1.21073.4/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/targets/Microsoft.NET.Sdk.BlazorWebAssembly.Current.targets(258,5): error MSB3954: Failed to compute hash for file '/datadisks/disk1/workspace/_work/1/s/src/Components/Web.JS/dist/Release/blazor.webassembly.js' because it does not exist or is inaccessible. [/datadisks/disk1/workspace/_work/1/s/src/Components/test/testassets/GlobalizationWasmApp/GlobalizationWasmApp.csproj]
/datadisks/disk1/workspace/_work/1/s/.dotnet/sdk/6.0.100-preview.1.21073.4/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/targets/Microsoft.NET.Sdk.BlazorWebAssembly.Current.targets(258,5): error MSB3954: Failed to compute hash for file '/datadisks/disk1/workspace/_work/1/s/src/Components/Web.JS/dist/Release/blazor.webassembly.js' because it does not exist or is inaccessible. [/datadisks/disk1/workspace/_work/1/s/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj]

The problem is the test assets projects attempt to use the Release version of blazor.webassembly.js which (because of -no-build-nodejs) doesn’t exist. Options include

  1. Fail fast (with a much clearer error message) when those projects attempt to build and blazor.webassembly.js doesn’t exist
  2. Fall back to the Debug version of the file (which is checked in) when the Release version doesn’t exist

Thoughts @dotnet/aspnet-blazor-eng❔

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dougbucommented, Feb 6, 2021

After some offline discussion, we’re going with the “fail fast” option because there is no checked-in blazor.webassembly.js file anymore. Specifically, I’ll add an <Error> if Microsoft.AspNetCore.Components.WebAssembly.csproj is packed and a <Warning> if any $(UsingMicrosoftNETSdkBlazorWebAssembly) (test) project is built when the file doesn’t exist.

I’ll also change the Microsoft.AspNetCore.Web.JS.npmproj project to use $(Configuration) instead of release because that’s what dependant projects consume.

0reactions
dougbucommented, Feb 11, 2021

5923818afcb8

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM install fails with node-gyp
I tried several days for this build issue, on my PC with Visual Studio 2010 / 2013 / 2015 installed, with no success....
Read more >
Node.js build fails with no obvious error - Windows
I have a build using Node.js on Windows and it errors out immediately after nvs use but there's no obvious error.
Read more >
Troubleshooting Node.js Deploys
Your Node.js deploy failed, now what? Start with these steps to troubleshoot a build issue. Check the Buildpack.
Read more >
Errors | Node.js v20.5.1 Documentation
System errors triggered by underlying operating system constraints such as attempting to open a file that does not exist or attempting to send...
Read more >
Best Practices for Node.js Error-handling
Developers working with Node.js sometimes find themselves writing not-so-clean code while handling all sorts of errors. This article will introduce you to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found