Skip to content

docusaurus doesn't run on bun #9294

@noraj

Description

@noraj

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

The current architecture is so that docusaurus requires nodejs to run while it could easily run on other javascript servers like bun.

Reproducible demo

No response

Steps to reproduce

  • bun x create-docusaurus@latest my-website classic
  • cd my-website
  • bun install
  • bun run docusaurus

Expected behavior

Working with bun as well with nodejs

Actual behavior

➜ bun run docusaurus
$ docusaurus
 9 |    }
10 | 
11 |    let seenVal = false;
12 | 
13 |    // Skip the first stack as it's this function
14 |    stacks.shift();
    ^
TypeError: stacks.shift is not a function. (In 'stacks.shift()', 'stacks.shift' is undefined)
      at /tmp/my-website/node_modules/parent-module/index.js:14:1
      at /tmp/my-website/node_modules/import-fresh/index.js:11:20
      at /tmp/my-website/node_modules/@docusaurus/core/lib/server/config.js:36:10
      at processTicksAndRejections (:1:2602)
error: script "docusaurus" exited with code 1 (SIGHUP)

Your environment

  • Docusaurus version used: 2.4.1
  • Environment name and version : bun 1.0.0
  • Operating system and version : archlinux

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed: duplicateThis issue or pull request already exists in another issue or pull request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions