facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
56.63k stars 8.51k forks source link

Clean installs are no-longer working #3054

Closed rrousselGit closed 4 years ago

rrousselGit commented 4 years ago

🐛 Bug Report

Running npm i on an existing project creating a new project breaks the site, which no-longer starta

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

Expected behavior

The site starts

Actual Behavior

An error screen, with many errors in the console:

See:

./node_modules/remark-admonitions/styles/infima.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./.docusaurus/client-modules.js 1:15-122 1:123-230 @ ./node_modules/@docusaurus/core/lib/client/client-lifecycles-dispatcher.js @ ./node_modules/@docusaurus/core/lib/client/App.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/Layout/styles.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/Layout/index.js 6:413-434 @ ./node_modules/@docusaurus/theme-classic/src/theme/NotFound.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./src/css/custom.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./.docusaurus/client-modules.js 1:463-539 @ ./node_modules/@docusaurus/core/lib/client/client-lifecycles-dispatcher.js @ ./node_modules/@docusaurus/core/lib/client/App.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/nprogress/nprogress.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/core/lib/client/PendingNavigation.js 6:261-293 @ ./node_modules/@docusaurus/core/lib/client/App.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./src/pages/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./src/pages/index.js 1:348-388 1:1554-1560 1:1695-1701 1:2156-2162 1:2457-2463 1:2581-2587 1:2770-2776 @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/DocItem/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/DocItem/index.js 6:339-379 6:726-732 6:3020-3026 6:3164-3170 6:4035-4041 6:4368-4374 6:5668-5674 @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/DocPage/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/DocPage/index.js 6:389-429 7:547-553 7:622-628 7:873-879 @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/infima/dist/css/default/default.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./.docusaurus/client-modules.js 1:231-337 @ ./node_modules/@docusaurus/core/lib/client/client-lifecycles-dispatcher.js @ ./node_modules/@docusaurus/core/lib/client/App.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/plugin-debug/src/theme/Debug/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/plugin-debug/src/theme/Debug/index.js 6:142-182 6:343-349 @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/Navbar/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/Navbar/index.js 6:597-637 10:1555-1561 10:1592-1598 10:2647-2653 10:3060-3066 @ ./node_modules/@docusaurus/theme-classic/src/theme/Layout/index.js @ ./node_modules/@docusaurus/theme-classic/src/theme/NotFound.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/Footer/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/Footer/index.js 6:200-240 6:2181-2187 @ ./node_modules/@docusaurus/theme-classic/src/theme/Layout/index.js @ ./node_modules/@docusaurus/theme-classic/src/theme/NotFound.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/AnnouncementBar/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/AnnouncementBar/index.js 6:173-213 6:563-569 6:691-697 6:831-837 @ ./node_modules/@docusaurus/theme-classic/src/theme/Layout/index.js @ ./node_modules/@docusaurus/theme-classic/src/theme/NotFound.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/MDXComponents/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/MDXComponents/index.js 6:139-179 7:174-180 @ ./node_modules/@docusaurus/theme-classic/src/theme/DocPage/index.js @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/DocSidebar/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/DocSidebar/index.js 6:556-596 10:568-574 10:2543-2549 10:2560-2566 10:2696-2702 10:2996-3002 10:3045-3051 10:3462-3468 10:3485-3491 10:3593-3599 @ ./node_modules/@docusaurus/theme-classic/src/theme/DocPage/index.js @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/BlogPostItem/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/BlogPostItem/index.js 6:255-295 6:1213-1219 6:1452-1458 @ ./node_modules/@docusaurus/theme-classic/src/theme/BlogListPage/index.js @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/Toggle/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/Toggle/index.js 6:151-191 6:262-268 6:276-282 6:361-367 6:375-381 @ ./node_modules/@docusaurus/theme-classic/src/theme/Navbar/index.js @ ./node_modules/@docusaurus/theme-classic/src/theme/Layout/index.js @ ./node_modules/@docusaurus/theme-classic/src/theme/NotFound.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/Heading/styles.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/Heading/index.js 6:193-214 @ ./node_modules/@docusaurus/theme-classic/src/theme/MDXComponents/index.js @ ./node_modules/@docusaurus/theme-classic/src/theme/DocPage/index.js @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/Heading/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/Heading/index.js 6:214-254 6:614-620 @ ./node_modules/@docusaurus/theme-classic/src/theme/MDXComponents/index.js @ ./node_modules/@docusaurus/theme-classic/src/theme/DocPage/index.js @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./node_modules/@docusaurus/theme-classic/src/theme/CodeBlock/styles.module.css Error: No valid exports main found for '/Users/remirousselet/dev/river_pod/website/foo/node_modules/colorette' @ ./node_modules/@docusaurus/theme-classic/src/theme/CodeBlock/index.js 6:400-440 24:495-501 24:584-590 24:730-736 24:750-756 24:925-931 24:944-950 24:1039-1045 @ ./node_modules/@docusaurus/theme-classic/src/theme/MDXComponents/index.js @ ./node_modules/@docusaurus/theme-classic/src/theme/DocPage/index.js @ ./.docusaurus/registry.js @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js

Your Environment

Reproducible Demo

Not needed – applies to fresh projects with no code involved.

slorber commented 4 years ago

Hi @rrousselGit

We didn't change anything regarding this dependency (which is transitive btw)

This seems related to this issue, due to bad ES modules support in some node versions: https://github.com/jorgebucaran/colorette/issues/48

Using node 13.7 or 14.x, and enable ES imports, should solve the issue