Open GalexyN opened 2 years ago
I have the exact same issue and to be honest I have no idea where to even start debugging it.
I made a minimal example to reproduce the build error, I hope it will help whoever can debug this:
https://github.com/balazsbotond/redocusaurus-typesense-bug-repro
Please note that @GalexyN also reported the same issue here: https://github.com/rohit-gohri/redocusaurus/issues/236
I've found a closed issue about the same problem in the debug.js project.
A PR which fixed this issue with minimal changes was rejected with the justification that "it wasn't the maintainers' job to fix other people's messes". Another PR which may fix this issue has been open for more than four years.
The original issue offers several possible workarounds by defining webpack plugins but I'm not sure these can be added to a Docusaurus project.
One of my coworkers suggested simply commenting out the offending line in the node_modules
folder (node_modules/debug/src/node.js
):
function save(namespaces) {
if (namespaces) {
// process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
Which, while being an incredibly hacky solution, is the one we currently use as part of our CI pipeline by running the following sed command after installing npm packages:
sed -i '/process.env.DEBUG = namespaces;/c\// process.env.DEBUG = namespaces;' ./node_modules/debug/src/node.js
Far from ideal, I know, but I hope it helps someone until the root cause is fixed.
Description
Hi
I'm getting a build error when I compile with 2 plugins in the same config
I also wanted to note that I only run into this error when running
npm run build
if i donpm start
everything works fine with both plugins available in the docusaurus config.I've tried a mix of the following
I've noticed that if I were to comment out the redocusaurus config in presets of
docusaurus.config.js
ORthemes:['docusaurus-theme-search-typesense']
the build happens smoothlydocusaurus.config.js
package.json
error message
Steps to reproduce
npm run build
with both redocusaurus and docusaurus-theme-search-typesense enabled in the docusaurus configExpected Behavior
Actual Behavior
Metadata
Typsense Version: 0.7.0-0
OS: MacOS Monterey 12.6