Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docusaurus compatibility #24589

Closed
felipecrs opened this issue Jul 15, 2024 · 0 comments · Fixed by #24912
Closed

Docusaurus compatibility #24589

felipecrs opened this issue Jul 15, 2024 · 0 comments · Fixed by #24912

Comments

@felipecrs
Copy link

felipecrs commented Jul 15, 2024

Version: Deno 1.45.2

The first:

deno run -A npm:create-docusaurus@latest my-website classic --typescript
[INFO] Creating new Docusaurus project...
[INFO] Installing dependencies with npm...
error: Uncaught (in promise) ReferenceError: require is not defined
if (require.main !== module) {
^
    at file:///home/felipecrs/.cache/deno/npm/registry.npmjs.org/shelljs/0.8.5/src/exec-child.js:1:1
[ERROR] Dependency installation failed.
[INFO] The site directory has already been created, and you can retry by typing:

  `cd my-website`
  `npm install`

But it's likely this one requires changes on Docusaurus level to support --package-manager=deno.

It can be bypassed with --skip-install, and then the command works.

$ cd my-website
$ DENO_FUTURE=1 deno install --allow-scripts

Then:

$ deno task start
? [WARNING] Something is already running on port 3000. Probably:
  `/home/felipecrs/.deno/bin/deno run -A npm:@docusaurus/core@3.4.0/docusaurus start` (pid 1573) in "/tmp/tmp.cL5qkqnI8O/my-website"

Would you like to run the app on another port instead? › (Y/n)

This is a compatibility issue, because I never ran deno task start before. Even tried to reboot my machine and the issue persists.

But then, accepting a different port:

[SUCCESS] Docusaurus website is running at: http://localhost:60833/

● Client █████████████████████████ building (46%) 2/3 entries 741/816 dependencies 166/277 modules 86 active
 mdx-loader › docs/tutorial-extras/translate-your-site.md

[WARNING] The image at "/tmp/tmp.cL5qkqnI8O/my-website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg" can't be read correctly. Please ensure it's a valid image.
handle.stat is not a function
[WARNING] The image at "/tmp/tmp.cL5qkqnI8O/my-website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg" can't be read correctly. Please ensure it's a valid image.
handle.stat is not a function
[WARNING] The image at "/tmp/tmp.cL5qkqnI8O/my-website/docs/tutorial-extras/img/localeDropdown.png" can't be read correctly. Please ensure it's a valid image.
handle.stat is not a function
[WARNING] The image at "/tmp/tmp.cL5qkqnI8O/my-website/docs/tutorial-extras/img/docsVersionDropdown.png" can't be read correctly. Please ensure i
✖ Client
  Compiled with some errors in 7.87s

Error: Digest method not supported: md4
    at String.replace (<anonymous>)

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

Error: Digest method not supported: md4
    at String.replace (<anonymous>)

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

Error: Digest method not supported: md4
    at String.replace (<anonymous>)
client (webpack 5.93.0) compiled with 3 errors

Looks like one of these were already reported:

But Digest method not supported: md4 is new, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant