You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
I agree with you and I'm sorry for opening this issue there.
What's deceptive and misleading is the release of Bun v1.0.0. Normally following semver 0.x.x are kind of unstable version while 1.0.0 means the 1st stable version. When I saw and tested v1 I expected Bun to be production ready while in fact it's still in beta since they claim to want full Node.js compatibility and in v1 the Node.js compatibility is still vastly incomplete https://bun.sh/docs/runtime/nodejs-apis.
So yeah most errors come from the fact that the Node.js compatibility is not 100% yet and not because upstream project have hard-coded nodejs stuff.
Activity
Josh-Cena commentedon Sep 9, 2023
Your error stack references Node, so not sure how it's related to bun. This error is a duplicate of #9291 and fixed by the latest Node.
noraj commentedon Sep 9, 2023
@Josh-Cena Sorry, it was an error of environment. I modified my original message with a reproducible clean environment.
Josh-Cena commentedon Sep 10, 2023
Responded in oven-sh/bun#4742.
slorber commentedon Sep 11, 2023
There's a dedicated Bun issue there, let's use it: oven-sh/bun#3426
slorber commentedon Sep 12, 2023
For reference this is why we use the Bun issue instead of the Docusaurus issue:
https://twitter.com/jarredsumner/status/1700497869160268155
noraj commentedon Sep 12, 2023
I agree with you and I'm sorry for opening this issue there.
What's deceptive and misleading is the release of Bun v1.0.0. Normally following semver 0.x.x are kind of unstable version while 1.0.0 means the 1st stable version. When I saw and tested v1 I expected Bun to be production ready while in fact it's still in beta since they claim to want full Node.js compatibility and in v1 the Node.js compatibility is still vastly incomplete https://bun.sh/docs/runtime/nodejs-apis.
So yeah most errors come from the fact that the Node.js compatibility is not 100% yet and not because upstream project have hard-coded nodejs stuff.
slorber commentedon Sep 13, 2023
Not sure it's their fault, it's also because Docusaurus uses a package that depends on V8