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