`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
to2.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 thenyarn install
- Ran
yarn cache clean
, removednode_modules
, and thenyarn 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
- Upgrade
@docusaurus/core
and@docusaurus/preset-classic
tov2.0.0-alpha.56
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:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes
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.