docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

TypeError [ERR_INVALID_ARG_TYPE] trying to 'yarn start' locally

Open JoshuaKGoldberg opened this issue 3 years ago • 4 comments

Have you read the Contributing Guidelines on issues?

Prerequisites

  • [X] I'm using the latest version of Docusaurus.
  • [X] I have tried the npm run clear or yarn clear command.
  • [X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • [X] I have tried creating a repro with https://new.docusaurus.io.
  • [X] I have read the console error message carefully (if applicable).

Description

On a fresh checkout of the main branch at 7ffa9f7, after a successful yarn including yarn build, yarn start ends with:

$ yarn workspace website start
$ docusaurus start
[INFO] Starting the development server...
[ERROR] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:120:11)
    at Object.join (node:path:1172:7)
    at getPluginI18nPath (/Users/josh/repos/docusaurus/packages/docusaurus-utils/lib/i18nUtils.js:41:27)
    at getDocsDirPathLocalized (/Users/josh/repos/docusaurus/packages/docusaurus-plugin-content-docs/lib/versions.js:80:42)
    at getVersionMetadataPaths (/Users/josh/repos/docusaurus/packages/docusaurus-plugin-content-docs/lib/versions.js:94:34)
    at createVersionMetadata (/Users/josh/repos/docusaurus/packages/docusaurus-plugin-content-docs/lib/versions.js:187:68)
    at /Users/josh/repos/docusaurus/packages/docusaurus-plugin-content-docs/lib/versions.js:312:64
    at Array.map (<anonymous>)
    at readVersionsMetadata (/Users/josh/repos/docusaurus/packages/docusaurus-plugin-content-docs/lib/versions.js:312:43)
[INFO] Docusaurus version: 3.0.0-alpha.0
Node version: v16.16.0

This happens on Node version v18.7.0 as well.

Reproducible demo

https://github.com/facebook/docusaurus

Steps to reproduce

git clone https://github.com/facebook/docusaurus
cd docusaurus
yarn
yarn start

Expected behavior

I wanted to develop on Docusaurus normally 😢

Actual behavior

no develop, only crash

Your environment

  • Public source code: https://github.com/facebook/docusaurus
  • Public site URL: https://docusaurus.io
  • Docusaurus version used: 3.0.0-alpha.0, apparently?
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js 16.16 and 18.7
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS Monterey 12.5 on a Macbook Air M2

Self-service

  • [X] I'd be willing to fix this bug myself.

JoshuaKGoldberg avatar Nov 09 '22 22:11 JoshuaKGoldberg

Fun, last time I saw this was someone on Windows. Now we are getting it for mac??

Josh-Cena avatar Nov 09 '22 22:11 Josh-Cena

I will like to take this up

Taofeek2438 avatar Nov 09 '22 23:11 Taofeek2438

Weird, I can't reproduce this myself. @Taofeek2438 can you?

Josh-Cena avatar Nov 10 '22 00:11 Josh-Cena

No problem chief @Josh-Cena

Taofeek2438 avatar Nov 10 '22 23:11 Taofeek2438

Closing out my old issues for repos I no longer have context on. If anybody has a need for what this issue was asking about, I'd encourage them/you to file a new issue. Cheers!

JoshuaKGoldberg avatar Feb 17 '24 20:02 JoshuaKGoldberg