docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

Docusaurus BUG: Exhaustive list of all broken links found

Open huan opened this issue 4 years ago • 1 comments

We can see from https://github.com/wechaty/wechaty.js.org/runs/2176830274#step:10:28

> cd docusaurus && docusaurus build


[en] Creating an optimized production build...
[info] [webpackbar] Compiling Client
[info] [webpackbar] Compiling Server
[success] [webpackbar] Client: Compiled successfully in 50.26s
[success] [webpackbar] Server: Compiled successfully in 58.15s
error building locale=en
Error: Docusaurus found broken links!

Please check the pages of your site in the list bellow, and make sure you don't reference any path that does not exist.
Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.

Exhaustive list of all broken links found:

- On source page path = /docs/getting-started/:
   -> linking to ../polyglot/go/overview.md (resolved as: /docs/polyglot/go/overview.md)

    at Object.reportMessage (/home/runner/work/wechaty.js.org/wechaty.js.org/node_modules/@docusaurus/utils/lib/index.js:453:19)
    at Object.handleBrokenLinks (/home/runner/work/wechaty.js.org/wechaty.js.org/node_modules/@docusaurus/core/lib/server/brokenLinks.js:144:17)
    at async buildLocale (/home/runner/work/wechaty.js.org/wechaty.js.org/node_modules/@docusaurus/core/lib/commands/build.js:164:5)
    at async tryToBuildLocale (/home/runner/work/wechaty.js.org/wechaty.js.org/node_modules/@docusaurus/core/lib/commands/build.js:33:28)
    at async Object.mapAsyncSequencial (/home/runner/work/wechaty.js.org/wechaty.js.org/node_modules/@docusaurus/utils/lib/index.js:409:24)
    at async build (/home/runner/work/wechaty.js.org/wechaty.js.org/node_modules/@docusaurus/core/lib/commands/build.js:71:25)

Docusaurus build system said that:

Exhaustive list of all broken links found:

- On source page path = /docs/getting-started/:
   -> linking to ../polyglot/go/overview.md (resolved as: /docs/polyglot/go/overview.md)

However, the code is as the following:

[Go](../polyglot/go/overview.md)

If I remove this content or change this content simply by add two characters after Go, the problem will not exist anymore.

- [Go](../polyglot/go/overview.md)
+ [Gott](../polyglot/go/overview.md)

It's very strange, and let's see how can we fix it by my next commit.

huan avatar Mar 23 '21 16:03 huan

After my last commit 3e96e1f2d4928bd150dba73dc7732532a61fa125 , we can see the v0.8.160 has been successful built.

The only change is

- [Go](../polyglot/go/overview.md)
+ [Gott](../polyglot/go/overview.md)

It's wired.

huan avatar Mar 23 '21 16:03 huan