A google search comes up with some information on the inputs of this api changing in a recent react-router release (~3 months ago) so perhaps something out of sync.
Config is fairly vanilla as follows. Note same behaviour without typedoc plugin.
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github')
const darkCodeTheme = require('prism-react-renderer/themes/dracula')
/**
* @type {import('@docusaurus/types').Config}
*/
const config = {
title: 'Docs',
tagline: '-',
url: 'https://google.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
noIndex: true,
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/**
* @type {import('@docusaurus/preset-classic').Options}
*/
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: '/',
editUrl: 'https://github.com/-/edit/main/x/x',
path: '../../',
include: ['**/*.md', '**/*.mdx'],
exclude: [
'node_modules/**/*.md*',
'**/node_modules/**/*.md*',
'**/build/**/*.md*',
'**/dist/**/*.md*',
'**/__tests__/**/*.md*',
'**/pages/**/*.md*',
'**/*.ts*',
'README.md*',
],
showLastUpdateAuthor: true,
showLastUpdateTime: true,
editCurrentVersion: true,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
blog: false,
sitemap: false,
}),
],
],
themeConfig:
/**
* @type {import('@docusaurus/preset-classic').ThemeConfig}
*/
({
navbar: {
logo: {
alt: '-',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docs',
label: 'Documentation',
position: 'left',
},
{
type: 'docSidebar',
sidebarId: 'api',
label: 'API',
position: 'left',
},
{
href: 'https://github.com/o',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'light',
links: [
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} -.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
plugins: [
['@cmfcmf/docusaurus-search-local', { indexBlog: false }],
[
'docusaurus-plugin-typedoc',
{
entryPoints: ['../lib-service'],
entryPointStrategy: 'packages',
sidebar: {
fullNames: true,
},
readme: 'none',
},
],
],
}
module.exports = config
[ERROR] Unable to build website for locale en.
[ERROR] TypeError: pathname.match is not a function
at Object.matchPath (~/node_modules/react-router/umd/react-router.development.js:789:26)
at ~/node_modules/react-router-config/cjs/react-router-config.js:16:42
at Array.some (<anonymous>)
at matchRoutes (~/node_modules/react-router-config/cjs/react-router-config.js:15:10)
at ~/node_modules/@docusaurus/core/lib/server/brokenLinks.js:36:63
at Array.map (<anonymous>)
at isBrokenLink (~/node_modules/@docusaurus/core/lib/server/brokenLinks.js:36:14)
at ~/node_modules/@docusaurus/core/lib/server/brokenLinks.js:40:53
at Array.filter (<anonymous>)
at getPageBrokenLinks (~/node_modules/@docusaurus/core/lib/server/brokenLinks.js:40:39)
at ~/node_modules/@docusaurus/core/lib/server/brokenLinks.js:54:99
at ~/node_modules/lodash/lodash.js:13469:38
at ~/node_modules/lodash/lodash.js:4967:15
at baseForOwn (~/node_modules/lodash/lodash.js:3032:24)
at Function.mapValues (~/node_modules/lodash/lodash.js:13468:7)
at getAllBrokenLinks (~/node_modules/@docusaurus/core/lib/server/brokenLinks.js:54:45)
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
A
TypeErrorappears onbuild.startworks fine.A google search comes up with some information on the inputs of this api changing in a recent react-router release (~3 months ago) so perhaps something out of sync.
https://stackoverflow.com/questions/71100360/react-router-error-pathname-match-is-not-a-function
Reproducible demo
N/A
Steps to reproduce
Config is fairly vanilla as follows. Note same behaviour without typedoc plugin.
Expected behavior
Successful build
Actual behavior
Your environment
Self-service