dotnet / docfx

Static site generator for .NET API documentation.
https://dotnet.github.io/docfx/
MIT License
4.09k stars 867 forks source link

[Bug] 2.78 Pdf Output Broken #10398

Open groogiam opened 3 days ago

groogiam commented 3 days ago

Describe the bug

The following command fails when using 2.78

docfx pdf docs/docfx.json
Error: Cannot find module 'C:\Users\myuser\.dotnet\tools\.store\docfx\2.78.0\docfx\2.78.0\tools\net8.0\any\.playwright\package\cli.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
    at Function._load (node:internal/modules/cjs/loader:1075:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

To Reproduce See Description above.

Expected behavior Pdf output should noterror out.

Context (please complete the following information):

Additional context Add any other context about the problem here.

groogiam commented 3 days ago

It looks like the playwright install location has changed inside the net folder to outside.

Image

filzrev commented 3 days ago

Sorry for causing regressions. I've created PR to fix problems at #10399.

Until new version is released. Copy ../../.playwright directory contents under bin directory.

Rported regression is not detected by existing tests. Because It's occurred when installing docfx from nupkg. I'll try to add integration tests to nightly build later.