When upgrading from 2.0.53 to 2.0.56 I was no longer able to run npm start as it would fail with an error that docusaurus-plugin-sass couldn't be found. I needed to modify the plugin line in docusaurus.config.js to use require.resolve instead of just the plugin name.
Yes
docusaurus-plugin-sass)docusaurus.config.jsplugins: ['docusaurus-plugin-sass']npm startplugins: [require.resolve('docusaurus-plugin-sass')]npm startDocusaurs would start
卤 npm start
> [email protected] start /Users/Dianoga/projects/developer-docs
> docusaurus start
Starting the development server...
Error: Cannot find module 'docusaurus-plugin-sass'
Require stack:
- /Users/Dianoga/projects/developer-docs
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
at Function.resolve (internal/modules/cjs/helpers.js:83:19)
at /Users/Dianoga/projects/developer-docs/node_modules/@docusaurus/core/lib/server/plugins/init.js:40:67
at Array.map (<anonymous>)
at Object.initPlugins (/Users/Dianoga/projects/developer-docs/node_modules/@docusaurus/core/lib/server/plugins/init.js:22:10)
at Object.loadPlugins (/Users/Dianoga/projects/developer-docs/node_modules/@docusaurus/core/lib/server/plugins/index.js:47:28)
at Object.load (/Users/Dianoga/projects/developer-docs/node_modules/@docusaurus/core/lib/server/index.js:57:62)
at start (/Users/Dianoga/projects/developer-docs/node_modules/@docusaurus/core/lib/commands/start.js:45:34)
at /Users/Dianoga/projects/developer-docs/node_modules/@docusaurus/core/bin/docusaurus.js:29:5
at Command.<anonymous> (/Users/Dianoga/projects/developer-docs/node_modules/@docusaurus/core/bin/docusaurus.js:97:23)
at Command.listener (/Users/Dianoga/projects/developer-docs/node_modules/commander/index.js:370:29)
at Command.emit (events.js:311:20)
at Command.parseArgs (/Users/Dianoga/projects/developer-docs/node_modules/commander/index.js:892:12)
at Command.parse (/Users/Dianoga/projects/developer-docs/node_modules/commander/index.js:642:21)
at Object.<anonymous> (/Users/Dianoga/projects/developer-docs/node_modules/@docusaurus/core/bin/docusaurus.js:120:5)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
I don't have one right now. Sorry!
Thanks for reporting! It's both a bug and a breaking change. Read the release notes for the workaround. We'll release a fix soon such that you shouldn't need to do that.
Every time I actually report a bug somewhere I find that there's something obvious that I didn't see 馃う
Thanks for pointing out the release notes 馃槃
Most helpful comment
Every time I actually report a bug somewhere I find that there's something obvious that I didn't see 馃う
Thanks for pointing out the release notes 馃槃