question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`v2.0.0-alpha.56` Breaks All Builds

See original GitHub issue

🐛 Bug Report

This issue has to do with the following packages:

  • @docusaurus/core v2.0.0-alpha.56
  • @docusaurus/preset-classic v2.0.0-alpha.56

Click to view `package.json`
// ...
  "dependencies": {
    "@docusaurus/core": "2.0.0-alpha.56",
    "@docusaurus/preset-classic": "2.0.0-alpha.56",
    "@docusaurus/theme-live-codeblock": "^2.0.0-alpha.56",
    "@material-ui/core": "^4.10.0",
    "@material-ui/icons": "^4.9.1",
    "@mdx-js/mdx": "^1.6.4",
    "classnames": "^2.2.6",
    "cross-env": "^7.0.2",
    "dotenv": "^8.2.0",
    "fs-extra": "^9.0.0",
    "github-slugger": "^1.3.0",
    "gray-matter": "^4.0.2",
    "loader-utils": "^2.0.0",
    "material-table": "^1.57.2",
    "mdast-util-to-string": "^1.1.0",
    "react": "^16.8.4",
    "react-dom": "^16.8.4",
    "react-live": "^2.2.2",
    "react-markdown": "^4.3.1",
    "remark-emoji": "^2.1.0",
    "stringify-object": "^3.3.0",
    "unist-util-visit": "^2.0.2"
  },
// ...

In Summary

  • Upgrading from 2.0.0-alpha.55 to 2.0.0-alpha.56 breaks all builds

Things I Have Tried:

  • Verified @docusaurus/theme-live-codeblock is installed and upgraded (see second error below for more info)
  • Removed node_modules and then yarn install
  • Ran yarn cache clean, removed node_modules, and then yarn install

The Fix:

  • Downgrading back to v2.0.0-alpha.55 resolves the issue.

Detailed Summary

After upgrading @docusaurus/core from v2.0.0-alpha.55 to v2.0.0-alpha.56 I receive the following error when running yarn start or yarn build (the important thing to note is the module Cannot find module '@docusaurus/plugin-content-docs'):

Click me to view error
$ docusaurus start
Starting the development server...
Error: Cannot find module '@docusaurus/plugin-content-docs'
Require stack:
- /Users/User/Path/To/Project
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
    at Function.resolve (internal/modules/cjs/helpers.js:78:19)
    at /Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/server/plugins/init.js:40:67
    at Array.map (<anonymous>)
    at Object.initPlugins (/Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/server/plugins/init.js:22:10)
    at Object.loadPlugins (/Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/server/plugins/index.js:47:28)
    at Object.load (/Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/server/index.js:57:62)
    at start (/Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/commands/start.js:45:34)
    at /Users/User/Path/To/Project/node_modules/@docusaurus/core/bin/docusaurus.js:29:5
    at Command.<anonymous> (/Users/User/Path/To/Project/node_modules/@docusaurus/core/bin/docusaurus.js:97:23)
    at Command.listener (/Users/User/Path/To/Project/node_modules/commander/index.js:370:29)
    at Command.emit (events.js:315:20)
    at Command.parseArgs (/Users/User/Path/To/Project/node_modules/commander/index.js:892:12)
    at Command.parse (/Users/User/Path/To/Project/node_modules/commander/index.js:642:21)
    at Object.<anonymous> (/Users/User/Path/To/Project/node_modules/@docusaurus/core/bin/docusaurus.js:120:5)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)

From there, I upgraded @docusaurus/preset-classic from v2.0.0-alpha.55 to v2.0.0-alpha.56, which produces the following error (again, note the package name - it’s different this time):

Click me to view error
$ docusaurus start
Starting the development server...
Error: Cannot find module '@docusaurus/theme-live-codeblock'
Require stack:
- /Users/User/Path/To/Project
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
    at Function.resolve (internal/modules/cjs/helpers.js:78:19)
    at /Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/server/plugins/init.js:40:67
    at Array.map (<anonymous>)
    at Object.initPlugins (/Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/server/plugins/init.js:22:10)
    at Object.loadPlugins (/Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/server/plugins/index.js:47:28)
    at Object.load (/Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/server/index.js:57:62)
    at start (/Users/User/Path/To/Project/node_modules/@docusaurus/core/lib/commands/start.js:45:34)
    at /Users/User/Path/To/Project/node_modules/@docusaurus/core/bin/docusaurus.js:29:5
    at Command.<anonymous> (/Users/User/Path/To/Project/node_modules/@docusaurus/core/bin/docusaurus.js:97:23)
    at Command.listener (/Users/User/Path/To/Project/node_modules/commander/index.js:370:29)
    at Command.emit (events.js:315:20)
    at Command.parseArgs (/Users/User/Path/To/Project/node_modules/commander/index.js:892:12)
    at Command.parse (/Users/User/Path/To/Project/node_modules/commander/index.js:642:21)
    at Object.<anonymous> (/Users/User/Path/To/Project/node_modules/@docusaurus/core/bin/docusaurus.js:120:5)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)


Original Questionnaire

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Upgrade @docusaurus/core and @docusaurus/preset-classic to v2.0.0-alpha.56
  2. yarn start

Expected behavior

Project to start and/or build.

Actual Behavior

Errors (see errors above)

Your Environment

  • Docusaurus version used: 2.0.0-alpha.56
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Node: v13.12.0, Firefox: 76.0.1
  • Operating system and version (desktop or mobile): Catalina 10.15.4

Reproducible Demo

Unable to provide a link for this issue - it’s one of those issues you have to test locally.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
SamChou19815commented, Jun 2, 2020

@SamChou19815 Ah I see, make sense.

So if I understand well the next version will allow the simple string notation again?

Yes

1reaction
SamChou19815commented, Jun 2, 2020

@SamChou19815 Why is this not documented? I think #2788 should had the doc updated together with the code. Otherwise it kind of defeats the main goal of docusaurus: “documentation as code” so that it’s always in sync with the code.

It is a regression and an unintended bug. My original intention is to ensure users don’t have to change docusaurus.config.js, that’s why it’s not documented. It has been fixed in #2829.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fast-csv: Versions | Openbase
Full version history for fast-csv including change logs.
Read more >
Docusaurus 是一个轻松构建,部署和维护网站的开源项目 - Gitee
We've built Docusaurus to handle the website build process so you can focus on your project ... This project exists thanks to all...
Read more >
opensourcemirror/Ionic - Ionic - Wolfhappens Gitea
non-breaking-button-states ... v2.0.0-alpha.56 ... a goal of ours is to have Ionic components easily work within all of the popular frameworks.
Read more >
The Fullstack React Framework — built on Next.js
New Blitz apps come with all the boring stuff already set up for you! ... Join our Discord Community where we help each...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found