facebook / facebook/docusaurus

Fails when installing in a repo using Tailwind PostCSS plugin: cannot read config from undefined

Offen
#6,631 42 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
TypeScript
Sterne
66.2k
Forks
10k
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
52

Beschreibung

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-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

Cannot start/build docusaurus classic template

Tried with node@14/node@16/node@17

### Steps to reproduce

Waiting for `npx create-docusaurus@latest web classic` to complete

```
cd web
yarn start
```

### Expected behavior

Client compiled

### Actual behavior

```
❯ yarn start
yarn run v1.22.17
$ docusaurus start
[INFO] Starting the development server...
[SUCCESS] Docusaurus website is running at http://localhost:3000/.

✖ Client
Compiled with some errors in 3.01s
[...]
TypeError: Cannot read properties of undefined (reading 'config')
TypeError: Cannot read properties of undefined (reading 'config')
TypeError: Cannot read properties of undefined (reading 'config')
TypeError: Cannot read properties of undefined (reading 'config')
client (webpack 5.68.0) compiled with 88 errors
```

### Your environment

new.docusaurus codesandbox bad gateway.
new.docusaurus stackblitz all ok

- Docusaurus version used: 2.0.0-beta.15
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js 14/16/17
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): darwin 21 (arm64)

### Reproducible demo

[My project](https://github.com/Kiyozz/papyrus-compiler-app/tree/139-docusaurus)

1. `pnpm i` to setup the project deps
2. `cd docs/web`
3. `yarn`
4. `yarn start`
5. See the errors in console without stack trace

You could remove the `docs/web` directory and create a docusaurus yourself

1. `rm -rf docs/web`
2. `cd docs`
3. `npx create-docusaurus@latest`
4. `web` for the project name
5. `classic` for the template
6. `use typescript`
7. `cd web`
8. `yarn start`
9. See the errors in console without stack trace

### Self-service

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.