surrealdb / docs.surrealdb.com

The documentation for SurrealDB, powered by Astro
https://surrealdb.com/docs/
71 stars 119 forks source link

Bug: Development server instructions on README using bun do not work #879

Open matthewjnield opened 1 day ago

matthewjnield commented 1 day ago

Describe the bug

The instructions for hosting the SurrealDB documentation using a local development server recently changed from using pnpm to using bun. When I run the specified bun commands, I receive error messages from bun dev and bun build.

image

image

Steps to reproduce

  1. Download a copy of the docs.surrealdb.com repository from GitHub. or clone it using `git clone "https://github.com/surrealdb/docs.surrealdb.com".

image

  1. From the command line, navigate into the repository directory.

  2. With bun installed (https://bun.sh/docs/installation), run the bun commands specified in the README:

    bun i
    bun dev
    bun build

Expected behaviour

I expected t bun dev command to successfully start a local development server, allowing me to open the documentation in my web browser.

I expected the bun build command to build a static version of the documentation content.

Contact Details

matthewjnield@gmail.com

Is there an existing issue for this?

Code of Conduct

Ekwuno commented 1 day ago

Hey @matthewjnield I am unable to reproduce this error. From the package.json file we do have these commands https://github.com/surrealdb/docs.surrealdb.com/blob/8df470d58e5d8b10a66a7aef6876dbef5e068377/package.json

Screenshot 2024-09-20 at 07 29 35 Screenshot 2024-09-20 at 07 30 48

Can you try with bun run dev or alternatively astro dev. We recommend bun but if you install with pnpm it should all still work as expected.

Build should be bun run build which I have updated

Alternatively there is now a make file in the repo https://github.com/surrealdb/docs.surrealdb.com/blob/8df470d58e5d8b10a66a7aef6876dbef5e068377/Makefile so you can do a make dev and it will run the corresponding command.