@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"
},
// ...
2.0.0-alpha.55 to 2.0.0-alpha.56 breaks all builds @docusaurus/theme-live-codeblock is installed and upgraded (see second error below for more info)node_modules and then yarn installyarn cache clean, removed node_modules, and then yarn installv2.0.0-alpha.55 resolves the issue.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)
Yes
@docusaurus/core and @docusaurus/preset-classic to v2.0.0-alpha.56yarn startProject to start and/or build.
Errors (see errors above)
Unable to provide a link for this issue - it's one of those issues you have to test locally.
There's a breaking change in the way plugins are imported, please see the release notes - https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.56
@yangshun Apologies! Thank you.
@SamChou19815 Why is this not documented? I think https://github.com/facebook/docusaurus/pull/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.
@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.
@SamChou19815 Ah I see, make sense.
So if I understand well the next version will allow the simple string notation again?
@SamChou19815 Ah I see, make sense.
So if I understand well the next version will allow the simple string notation again?
Yes
Most helpful comment
Yes