Skip to main content

Common Create-React-App Errors

TypeError: cmd is not a function

This error typically occurs when you set up a Medusa project with create-medusa-app and try to run the Medusa backend.

To resolve this issue, make sure you change into the backend directory of the Medusa project you created before trying to start the Medusa backend:

cd backend
npx medusa develop

Invalid Token Error with --no-browser Option

If you use the --no-browser option with the create-medusa-app command, you'll find a URL outputted at the end of the command execution. This is the URL that you can use to set a password for your admin user.

However, if you copy the URL, then try later to access that URL, you may receive an "Invalid Token" error. This is because when you copy the URL, a lot of extra space may be added into the token. So, you must clear out the spaces within the token and the || characters, then try again.

Alternatively, you can create a new user with the medusa user command.

Other Errors

As a last resort to resolve your issue, please try to clear your npx cache, as it could hold a cached version of create-medusa-app with errors.

Run the following command:

rm -rf "$(npm config get cache)/_npx"

Try running the create-medusa-app command again.

If your issue persists, please try to search through our GitHub issues to see if there's a solution for your issue. If not, please create an issue on GitHub and our team will help you resolve it soon.

Was this section helpful?