PolkadotStudy / polkadot.study

Polkadot.study public website
https://polkadot.study
GNU General Public License v3.0
19 stars 15 forks source link

Getting error when running `yarn start` #36

Closed ical10 closed 8 months ago

ical10 commented 8 months ago

Describe the bug Package installation worked well (yarn), but running yarn start gave me an error.

To Reproduce Steps to reproduce the behavior:

  1. Run yarn
  2. Run yarn start

Expected behavior This command starts a local development server and opens up a browser window, without any errors.

Screenshots

Error: Invalid sidebar file at "sidebars.js".
These sidebar document ids do not exist:
- substrate-in-bits/README

Available document ids are:
- decentralized-exchange-ink/conclusion
- decentralized-exchange-ink/implementation
- decentralized-exchange-ink/introduction
- decentralized-exchange-ink/unit-testing
- index
- interactive-substrate-tutorials-rusty-crewmates
- kitties-part-01/conclusion
- kitties-part-01/intro
- kitties-part-01/step1
- kitties-part-01/step2
- kitties-part-01/step3
- kitties-part-01/step4
- kitties-part-01/step5
- kitties-part-01/step6
- kitties-part-01/step7
- kitties-part-01/step8
- parachain-to-polkadot-vault/conclusion
- parachain-to-polkadot-vault/intro
- parachain-to-polkadot-vault/step1
- parachain-to-polkadot-vault/step2
- parachain-to-polkadot-vault/step3
- parachain-to-polkadot-vault/step4
- parachain-to-polkadot-vault/step5
- substrate-inherents-tutorial/client
- substrate-inherents-tutorial/conclusion
- substrate-inherents-tutorial/intro
- substrate-inherents-tutorial/running-nodes
- substrate-inherents-tutorial/runtime
- substrate-inherents-tutorial/setup
- substrate-inherents-tutorial/weather-oracle
- tags/contribute
- tags/polkadot-js
- tags/substrate
- tags/xcm
- tokengated-polkadot-next-js/authentication-with-next-auth
- tokengated-polkadot-next-js/conclusion
- tokengated-polkadot-next-js/connecting-to-the-wallet-browser-extension
- tokengated-polkadot-next-js/intro
- tokengated-polkadot-next-js/setup
- wallet-with-polkadot-js-and-react-with-typescript/conclusion
- wallet-with-polkadot-js-and-react-with-typescript/intro
- wallet-with-polkadot-js-and-react-with-typescript/step1
- wallet-with-polkadot-js-and-react-with-typescript/step2
- wallet-with-polkadot-js-and-react-with-typescript/step3
- wallet-with-polkadot-js-and-react-with-typescript/step4
- wallet-with-polkadot-js-and-react-with-typescript/step5

    at Object.checkSidebarsDocIds (/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@niklasp/docusaurus-plugin-content-tutorials/lib/sidebars/utils.js:243:19)
    at doLoadVersion (/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@niklasp/docusaurus-plugin-content-tutorials/lib/index.js:113:31)
    at async loadVersion (/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@niklasp/docusaurus-plugin-content-tutorials/lib/index.js:130:28)
    at async Promise.all (index 0)
    at async Object.loadContent (/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@niklasp/docusaurus-plugin-content-tutorials/lib/index.js:138:33)
    at async /Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@docusaurus/core/lib/server/plugins/index.js:35:25
    at async Promise.all (index 8)
    at async loadPlugins (/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@docusaurus/core/lib/server/plugins/index.js:34:27)
    at async load (/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@docusaurus/core/lib/server/index.js:76:58)
    at async Command.start (/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@docusaurus/core/lib/commands/start.js:44:19)

[INFO] Docusaurus version: 3.0.1
Node version: v20.11.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Desktop (please complete the following information):

Additional context I need to be able to run a local dev server to add a new tutorial.

github-actions[bot] commented 8 months ago

Cool, thank you for creating your first issue on polkadot.study.

niklasp commented 8 months ago

Hi, did you do this?

https://polkadot.study/docs/authors/new-tutorial-on-polkadot-study/development-environment#running-the-docusaurus-development-server

ical10 commented 8 months ago

@niklasp Thanks for the link, but now I'm getting another error.

ERROR in ./tutorials/substrate-in-bits/docs/networking-in-substrate.md
Module build failed (from ./node_modules/@docusaurus/mdx-loader/lib/index.js):
Error: MDX compilation failed for file "/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/tutorials/substrate-in-bits/docs/networking-in-substrate.md"
Cause: Expected a closing tag for `<primary>` (47:49-47:77) before the end of `paragraph`
Details:
{
  "column": 1,
  "message": "Expected a closing tag for `<primary>` (47:49-47:77) before the end of `paragraph`",
  "line": 47,
  "name": "47:1-47:77",
  "place": {
    "start": {
      "line": 47,
      "column": 1,
      "offset": 1442,
      "_index": 0,
      "_bufferIndex": 0
    },
    "end": {
      "line": 47,
      "column": 77,
      "offset": 1518,
      "_index": 1,
      "_bufferIndex": -1
    }
  },
  "reason": "Expected a closing tag for `<primary>` (47:49-47:77) before the end of `paragraph`",
  "ruleId": "end-tag-mismatch",
  "source": "mdast-util-mdx-jsx"
}

    at Object.mdxLoader (/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/node_modules/@docusaurus/mdx-loader/lib/loader.js:126:25)
ERROR in ./.docusaurus/registry.js 1:46862-46980
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-contribute-7e0.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47031-47101
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-contribute-7e0.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47146-47265
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-polkadot-js-dff.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47317-47388
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-polkadot-js-dff.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47427-47534
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-tag-1-b3f.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47580-47645
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-tag-1-b3f.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47683-47789
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-tag-2-bf9.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47835-47900
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-tag-2-bf9.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:52843-52948
Module not found: Error: Can't resolve '~docs/default/tags-list-current-prop-15a.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:52997-53065
Module not found: Error: Can't resolve '~docs/default/tags-list-current-prop-15a.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:53371-53481
Module not found: Error: Can't resolve '~docs/default/version-current-metadata-prop-751.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:53537-53612
Module not found: Error: Can't resolve '~docs/default/version-current-metadata-prop-751.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'

Edit: It seems like MDX fails when reading < character inside ./tutorials/substrate-in-bits/docs/networking-in-substrate.md. I've commented out that line, and now I get another rather cryptic error:

ERROR in ./.docusaurus/registry.js 1:46862-46980
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-contribute-7e0.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47031-47101
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-contribute-7e0.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47146-47265
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-polkadot-js-dff.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47317-47388
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-polkadot-js-dff.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47427-47534
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-tag-1-b3f.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47580-47645
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-tag-1-b3f.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47683-47789
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-tag-2-bf9.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:47835-47900
Module not found: Error: Can't resolve '~docs/default/tag-docs-tags-tag-2-bf9.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:52843-52948
Module not found: Error: Can't resolve '~docs/default/tags-list-current-prop-15a.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:52997-53065
Module not found: Error: Can't resolve '~docs/default/tags-list-current-prop-15a.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:53371-53481
Module not found: Error: Can't resolve '~docs/default/version-current-metadata-prop-751.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
ERROR in ./.docusaurus/registry.js 1:53537-53612
Module not found: Error: Can't resolve '~docs/default/version-current-metadata-prop-751.json' in '/Users/rizal/GDrive/scio-labs/inkathon-stuff/polkadot.study/.docusaurus'
niklasp commented 8 months ago

@ical10 sorry for the issue, will take a look next week to migrate to docusaurus 3 and fix all issues.

niklasp commented 8 months ago

@ical10 the issue is resolved on staging (with outdated submodule content). I am waiting for the submodule authors to merge my fixes to their code which conflicts with docusaurus3.0.

You should be able to checkout staging and run dev server there

ical10 commented 8 months ago

@niklasp thanks, staging works on my end.