pgruetter
pgruetter

Reputation: 1214

How do I correctly scaffold a new Docusaurus website?

Trying to get started with a Docusaurus v2 website. Don't know much about npm or JavaScript in general, so maybe I'm missing something obvious.

I'm on Ubuntu 20.10, npm -v is 6.14.8, npx -vis 10.2.2 and yarn -v is 1.22.5.

When I execute the example from the documentation, I get an error:

$ npx @docusaurus/init init my-website classic
Too many arguments.

If I try without the name or template, I would expect it to prompt for them, but get another error:

$ npx @docusaurus/init init
Expected single character argument.

Is there something fundamentally wrong with my npm installation?

Thanks

Upvotes: 1

Views: 576

Answers (1)

pgruetter
pgruetter

Reputation: 1214

Turns out, I just had to user a newer node version. Details about the issue are here. A workaround would be to use @latest as in

npx @docusaurus/init@latest init my-website classic

Upvotes: 1

Related Questions