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

feat: Migrate pnpm to Bun #323

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

feat: Migrate pnpm to Bun #323

wants to merge 1 commit into from

Conversation

wouterlucas
Copy link
Contributor

@wouterlucas wouterlucas commented Jul 5, 2024

Migrate pnpm to Bun as a package manager of choice for local renderer development.

Everything works except Docker, which has an issue with wait-port on Bun. It returns a socket and exits with error code 3 while it does work on the host machine. Likely due to not being able to detach the child process for building the preview?

Error:

% bun run start --ci
$ bun test:visual --ci
$ bun src/index.ts --ci
Running in docker container with `ci` runtime environment...
Waiting for docker container to exit...
bun install v1.1.17 (bb66bba1)

Checked 277 installs across 298 packages (no changes) [201.00ms]
$ cd visual-regression && bun test:visual --port 50535 --filter *
$ bun src/index.ts --port 50535 --filter DOCKER.md README.md bun.lockb certified-snapshots failed-results node_modules package-lock.json package.json src tsconfig.json
Compare Capture Mode
Building Renderer...
$ cd .. && bun run build
$ tsc --build
Building Examples...
$ cd ../examples && bun run build
$ vite build
Serving Examples (port: 50535)...
$ cd ../examples && bun run preview:automation --port 50535 --host localhost
$ vite preview --port 50535 --host localhost

  Unknown error occurred waiting for 50535: [object Socket]
waitPortRes 3
Failed to start server!

Parking it here, for now.

In order to migrate from pnpm:

  1. Remove your node modules
  2. Make sure local pnpm lock files are gone
  3. Install Bun if you havent already, see (https://bun.sh/)[https://bun.sh/] to get started
  4. Run Bun i to install dependencies and start with Bun start

Todo:

  • Look into Github action workflow and make sure it works with Bun
  • Fix --ci Docker issue with wait-port

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 this pull request may close these issues.

1 participant