Skip to main content

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_modulesCopy to Clipboard 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/contentCopy to Clipboard. 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/docsCopy to Clipboard which causes an invalid hook callCopy to Clipboard error.

For that reason, when the startCopy to Clipboard and buildCopy to Clipboard scripts in www/docsCopy to Clipboard are used, the clean-node-modulesCopy to Clipboard script is called. This script deleted the node_modulesCopy to Clipboard directory in the root of the Medusa repository.


Out of Memory Error

If you receive the following error when you run the buildCopy to Clipboard command in www/docsCopy to Clipboard:

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

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 buildCopy to Clipboard command.

To do that, run the buildCopy to Clipboard command with the NODE_OPTIONSCopy to Clipboard environment variable set:

NODE_OPTIONS="--max-old-space-size=8192" yarn build
Report Incorrect CodeCopy to Clipboard
Was this page helpful?