Closed niravbhuva99 closed 7 months ago
This is not related to Docusaurus.
You are getting this error while running webpack --mode production
on a custom Webpack config file you have in your project, which we are not responsible for because it is not something we provide you.
So, this is not a Docusaurus bug. At best, I can help you if you have specific questions. But please assume I don't know anything about NetlifyCMS and don't plan to study your custom setup in depth to figure out what you are doing.
Note that NetlifyCMS is not maintained anymore, and has a new name DecapCMS now: https://www.netlify.com/blog/netlify-cms-to-become-decap-cms/
You are not even using the latest version of Docusaurus.
It's hard to even help you if you use older versions of projects, even more if we do not even know these projects well ourselves (such as NetlifyCMS)
You probably misunderstand how Webpack resolves aliases, and should read more carefully this documentation:
https://webpack.js.org/configuration/resolve/#resolvealias
I'd suggest using absolute paths instead of relative paths, and use an exhaustive list of exact match aliases instead of @docusaurus
, because @docusaurus
will also match @docusaurus/whatever/comes/after
.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
I am encountering an error when attempting to import a Docusaurus Swizzle component into Netlify CMS. For each Docusaurus client API component used within the Swizzle component, Webpack throws an error.
Reproducible demo
No response
Steps to reproduce
Expected behavior
Upon importing a Docusaurus Swizzle component into Netlify CMS, webpack should successfully resolve the imports of Docusaurus client API components within the Swizzle component without throwing any errors.
Actual behavior
Error Example
When including a Docusaurus component such as
Link
within the Swizzle component, Webpack throws the following error:Your environment
Self-service