I am using Docusaurus 2.
Creating an optimized production build...
β Client
Compiled successfully in 1.21m
β Server
Compiled with some errors in 1.35m
TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)TypeError: Cannot read property 'replace' of undefined
at String.replace (<anonymous>)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
(undefined) TypeError: Cannot read property 'replace' of undefined
at Object.options.minifyJS (main:18886:28)
at Object.chars (main:19374:24)
at main:48346:19
at String.replace (<anonymous>)
at new HTMLParser (main:48338:19)
at minify (main:19160:3)
at module.exports.exports.minify (main:19521:16)
at serverEntry_render (main:88195:38)
Error: Failed to compile with errors.
at /Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/@docusaurus/core/lib/webpack/utils.js:164:24
at finalCallback (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/MultiCompiler.js:254:12)
at /Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/MultiCompiler.js:277:6
at done (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/neo-async/async.js:2931:13)
at runCompilers (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/MultiCompiler.js:181:48)
at /Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/MultiCompiler.js:188:7
at /Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/MultiCompiler.js:270:7
at finalCallback (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/Compiler.js:257:39)
at /Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/Compiler.js:273:13
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:42:1)
at AsyncSeriesHook.lazyCompileHook (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/tapable/lib/Hook.js:154:20)
at onCompiled (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/Compiler.js:271:21)
at /Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/Compiler.js:681:15
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/tapable/lib/Hook.js:154:20)
at /Users/kumarabhirup/Documents/Repositories/propagateAt/node_modules/webpack/lib/Compiler.js:678:31
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
module.exports = {
title: 'propagate.at',
tagline: 'Email, WhatsApp and SMS Marketing for Online Creators',
url: 'https://kb.propagate.at',
baseUrl: '/',
onBrokenLinks: 'throw',
favicon: 'img/favicon.ico',
organizationName: 'propagate-at', // Usually your GitHub org/user name.
projectName: 'propagateAt', // Usually your repo name.
themeConfig: {
colorMode: {
disableSwitch: true,
},
navbar: {
// title: 'propagate.at',
logo: {
alt: 'PropagateAt Logo',
src: 'img/PropagateAt Logo Light.svg'
},
items: [
{
to: 'docs/',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
},
{to: 'blog', label: 'Press', position: 'left'},
{
href: 'https://github.com/propagate-at',
label: 'GitHub',
position: 'right',
},
{
href: 'https://propagate.at/dashboard',
label: 'Dashboard',
position: 'right',
},
],
},
footer: {
style: 'light',
logo: {
alt: 'PropagateAt Logo',
src: 'img/PropagateAt Logo Light.svg',
},
links: [
{
title: 'Docs',
items: [
{
label: 'Developer API',
to: 'docs/api/',
},
{
label: 'Guides',
to: 'docs/guides/',
},
],
},
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/RHZMhgF',
},
{
label: 'Twitter',
href: 'https://twitter.com/propagateHQ',
},
],
},
{
title: 'Social',
items: [
// {
// label: 'Twitter',
// href: 'https://twitter.com/propagateHQ',
// },
{
label: 'Facebook',
href: 'https://fb.com/propagate.at',
},
{
label: 'Instagram',
href: 'https://www.instagram.com/propagate.at/',
}
],
},
{
title: 'More',
items: [
{
label: 'Press',
to: 'blog',
},
{
label: 'GitHub',
href: 'https://github.com/propagate-at',
},
{
label: 'LinkedIn',
href: 'https://www.linkedin.com/company/propagateAt',
}
],
},
],
copyright: `Copyright Β© ${new Date().getFullYear()} PropagateAt, Inc. Built with β€οΈ for creators.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// editUrl:
// 'https://github.com/facebook/docusaurus/edit/master/website/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// editUrl:
// 'https://github.com/facebook/docusaurus/edit/master/website/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};
Btw, I am new to Docusaurus.
"@docusaurus/core": "2.0.0-alpha.66",
"@docusaurus/preset-classic": "2.0.0-alpha.66"
I will soon create a Demo Repo exclusively for this issue. Would like to get some time.
π Bug Report
I am using Docusaurus 2.
I get this error when I run
docusaurus build,Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
docusaurus.config.jsdocusaurus build.Behavior
docusaurus startworks perfectly fine for development purposes. After I got the expected result on dev stage, I randocusaurus build. Then I got that error.Btw, I am new to Docusaurus.
Your Environment
Reproducible Demo
I will soon create a Demo Repo exclusively for this issue. Would like to get some time.