Files
medusa-store/www/apps/docs/content/troubleshooting/documentation-error.md
Shahed Nasser fa7c94b4cc docs: create docs workspace (#5174)
* docs: migrate ui docs to docs universe

* created yarn workspace

* added eslint and tsconfig configurations

* fix eslint configurations

* fixed eslint configurations

* shared tailwind configurations

* added shared ui package

* added more shared components

* migrating more components

* made details components shared

* move InlineCode component

* moved InputText

* moved Loading component

* Moved Modal component

* moved Select components

* Moved Tooltip component

* moved Search components

* moved ColorMode provider

* Moved Notification components and providers

* used icons package

* use UI colors in api-reference

* moved Navbar component

* used Navbar and Search in UI docs

* added Feedback to UI docs

* general enhancements

* fix color mode

* added copy colors file from ui-preset

* added features and enhancements to UI docs

* move Sidebar component and provider

* general fixes and preparations for deployment

* update docusaurus version

* adjusted versions

* fix output directory

* remove rootDirectory property

* fix yarn.lock

* moved code component

* added vale for all docs MD and MDX

* fix tests

* fix vale error

* fix deployment errors

* change ignore commands

* add output directory

* fix docs test

* general fixes

* content fixes

* fix announcement script

* added changeset

* fix vale checks

* added nofilter option

* fix vale error
2023-09-21 20:57:15 +03:00

1.4 KiB

title
title
Troubleshooting Documentation Errors

React Hook Errors

If you have installed the dependencies in the root of the Medusa repository (that is, if you have a node_modules directory at the root of the Medusa repository), this will cause an error when running the documentation website.

This is because the content resides in docs/content. When that content is being imported from there, a mix up can happen between the dependencies in the root of the Medusa repository and the dependencies in www/docs which causes an invalid hook call error.

For that reason, when the start and build scripts in www/docs are used, the clean-node-modules script is called. This script deleted the node_modules directory in the root of the Medusa repository.


Out of Memory Error

If you receive the following error when you run the build command in www/docs:

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

This is because of an ongoing issue in Docusaurus that occurs in large documentation websites. As it is still not resolved, the workaround would be to change the memory limit for Node.js while running the build command.

To do that, run the build command with the NODE_OPTIONS environment variable set:

NODE_OPTIONS="--max-old-space-size=8192" npm run build