Skip to main content

Troubleshooting

This article outlines about mitigating common configuration issues and upgrades

Initialization

The project requires Node.js version 18 or up and uses npm as the package manager.

npx create-docusaurus@latest website classic --typescript
npm run start

Test locally

npm run build && npm run serve

Fix Common Issues

Issues can happen especially during upgrades in the core packages. If you ran into one, follow these steps:

Clear caches

npm run clear

Delete modules

Delete the node_modules and package-lock.json, or yarn.lock

rm -rf node_modules yarn.lock package-lock.json

Reinstall packages

For Yarn

Skip this if you're not using yarn.

ni yarn.lock
npm install

Using Yarn

important

Installing Yarn globally is NOT recommended.

Instead, we can use Corepack, which enables us to define our preferred package manager and its version in the package.json file.

corepack enable
yarn set version stable
yarn install
yarn start