goatcorp / dalamud-docs

Dalamud developer documentation site
https://dalamud.dev/
MIT License
6 stars 21 forks source link

Not starting on Windows #11

Closed SayuShira closed 7 months ago

SayuShira commented 10 months ago

Hey! I'm having trouble running this locally on Windows.

I get the following error upon pnpm start.

Module not found: Error: Can't resolve '@site/news/2023-06-25-introducing-dalamud.dev.md?truncated=true' in 'D:\Coding\Sayu\C#\Dalamud\dalamud-docs\.docusaurus'

--------------------------

Module not found: Error: Can't resolve '@site/news/2023-06-25-introducing-dalamud.dev.md?truncated=true' in 'D:\Coding\Sayu\C#\Dalamud\dalamud-docs\.docusaurus'

--------------------------

Module not found: Error: Can't resolve '@site/news/2023-09-21-dalamud-v9-stabilization.md?truncated=true' in 'D:\Coding\Sayu\C#\Dalamud\dalamud-docs\.docusaurus'

--------------------------

... all news files twice

--------------------------

Module not found: Error: Can't resolve 'D:\Coding\Sayu\C#\Dalamud\dalamud-docs\node_modules\.pnpm\webpack-dev-server@4.15.1_webpack@5.88.2\node_modules\webpack-dev-server\client\index.js?protocol=ws%3A&hostname=0.0.0.0&port=0&pathname=%2Fws&logging=warn&progress=true&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=true&live-reload=false' in 'D:\Coding\Sayu\C#\Dalamud\dalamud-docs'

Looking into .docusaurus the files appear to be there under .docusaurus/docusaurus-plugin-content-blog/default just like the doc files are under .docusaurus/docusaurus-plugin-content-docs/default. Or some meta files, not the full content.

What I tried:

Yes, just trying everything..

Next day me cloned the project to WSL and it kinda ran there. Another, new, error showed, but was a relatively simple fix (faq imported Constructor instead of constructor). Here the website loaded, displaying an overlay with the errors.

I went back to windows to try more and found that if i manually edit ?truncated=true out of the .docusaurus/registry.js it loads everything just fine. The problem is that this file is recreated every pnpm start. So far I'm unable to find a config option that would stop docusaurus from adding ?truncated=true.

Maybe I am just missing something? Do you have any ideas? Did anyone successfully run it on windows? Might also just be a alpha/beta thing with windows.

Thanks for reading so far in any case.


Side note: As mentioned I tried updating docusaurus (v3alpha -> v3beta). With the beta running the compilation has one more error. See below. At least this was a fast and easy fix >.<

Above errors appeared as well on windows. The compilation error below does happen on WSL too.
Curiously windows only printed one of these errors. This below is from WSL. Sadly the differentiating part of the file path (again ?truncated=true) is only visible on the overlay error on the webpage, which doesn't load on windows.

Error: MDX compilation failed for file "/home/sayu/dalamud-docs/news/2023-09-21-dalamud-v9-stabilization.md"
Cause: Expected a closing tag for `<br>` (51:1-51:5)
Details:
{
  "name": "1:1",
  "message": "Expected a closing tag for `<br>` (51:1-51:5)",
  "reason": "Expected a closing tag for `<br>` (51:1-51:5)",
  "line": null,
  "column": null,
  "position": {
    "start": {
      "line": null,
      "column": null
    },
    "end": {
      "line": null,
      "column": null
    }
  },
  "source": "mdast-util-mdx-jsx",
  "ruleId": "end-tag-mismatch"
}

--------------------------

Error: MDX compilation failed for file "/home/sayu/dalamud-docs/news/2023-09-21-dalamud-v9-stabilization.md"
Cause: Expected a closing tag for `<br>` (51:1-51:5)
Details:
{
  "name": "1:1",
  "message": "Expected a closing tag for `<br>` (51:1-51:5)",
  "reason": "Expected a closing tag for `<br>` (51:1-51:5)",
  "line": null,
  "column": null,
  "position": {
    "start": {
      "line": null,
      "column": null
    },
    "end": {
      "line": null,
      "column": null
    }
  },
  "source": "mdast-util-mdx-jsx",
  "ruleId": "end-tag-mismatch"
}
client (webpack 5.88.2) compiled with 2 errors
SayuShira commented 7 months ago

I randomly looked into this again, since there were a few updates. My issue didn't go away from that, but I stumbled upon the # in my path. I tried without and ... it works. Yeah, stupid easy "fix". My bad. Closing this.