docusaurus: (v2) "ENOENT: no such file or directory" after upgrading from alpha.61 to alpha.62

Thanks for everyone’s work on this awesome product. It has been really useful for us.

πŸ› Bug Report

When running npm run build after upgrading from alpha.61 to alpha.62, the website does not build, and this output is repeated for many/all pages:

(node:35940) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/me/workspace/pact-foundation/docs.pact.io/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-pact-broker-2-lib-pact-broker-doc-views-index-pacticipant-version-tag-md-c69.json'

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

Upgrade from alpha.61 to alpha.62 as per commit https://github.com/pact-foundation/docs.pact.io/commit/e650d27f768c69805bd8822122f0274ff063a555

These two branches show the difference in the package.json and behaviour.

git clone git@github.com:pact-foundation/docs.pact.io.git
cd docs.pact.io/website
npm i
npm run build # this will succeed, as it's on alpha.61

git checkout chore/docusaurus-alpha-62
npm i
npm run build # this hangs and has numerous lines of error output

Expected behavior

Build completes successfully as per https://travis-ci.com/github/pact-foundation/docs.pact.io/builds/181930983

Actual Behavior

Build hangs, screen is filled with errors in the following format, as per https://travis-ci.com/github/pact-foundation/docs.pact.io/builds/181931029

(node:35940) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/me/workspace/pact-foundation/docs.pact.io/website/.docusaurus/docusaurus-plugin-content-docs/default/site-docs-pact-broker-2-lib-pact-broker-doc-views-index-pacticipant-version-tag-md-c69.json'

Your Environment

  • Docusaurus version used: docusaurus/core 2.0.0-alpha.62
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): node v12.0.0
  • Operating system and version (desktop or mobile): Mac desktop

Reproducible Demo

As per reproduction steps.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Thanks for the quick response and the PR @slorber πŸ™

I see the same when building (yarn build) on Netlify. When running the development server (yarn start) I am seeing:

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Hash.update (internal/crypto/hash.js:82:11)
    at Object.generate (M:\Git\data.home-assistant\node_modules\@docusaurus\core\node_modules\@docusaurus\utils\lib\index.js:40:52)
    at createData (M:\Git\data.home-assistant\node_modules\@docusaurus\core\lib\server\plugins\index.js:76:27)
    at async Object.contentLoaded (M:\Git\data.home-assistant\node_modules\@docusaurus\plugin-debug\lib\index.js:23:36)
    at async M:\Git\data.home-assistant\node_modules\@docusaurus\core\lib\server\plugins\index.js:92:9
    at async Promise.all (index 3)
    at async Object.loadPlugins (M:\Git\data.home-assistant\node_modules\@docusaurus\core\lib\server\plugins\index.js:65:5)
    at async Object.load (M:\Git\data.home-assistant\node_modules\@docusaurus\core\lib\server\index.js:78:58)
    at async start (M:\Git\data.home-assistant\node_modules\@docusaurus\core\lib\commands\start.js:44:19)

Affected PRs (contain links to the builds in checks) home-assistant/data.home-assistant#81 home-assistant/data.home-assistant#82 home-assistant/developers.home-assistant#628 home-assistant/developers.home-assistant#629 home-assistant/companion.home-assistant#318 home-assistant/companion.home-assistant#319