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

Bun script crashes when trying to compile SASS styles #11893

Open
Atulin opened this issue Jun 15, 2024 · 0 comments
Open

Bun script crashes when trying to compile SASS styles #11893

Atulin opened this issue Jun 15, 2024 · 0 comments
Labels
crash An issue that could cause a crash windows An issue that only occurs on Windows

Comments

@Atulin
Copy link

Atulin commented Jun 15, 2024

How can we reproduce the crash?

Install the sass-embedded package and write a build script like

import { Glob } from "bun";
import { join } from "node:path";
import * as sass from 'sass-embedded';

const styleFiles = new Glob(join(import.meta.dir, "static/**/*.scss"));

const outDir = join(import.meta.dir, "dist");

for await (const file of styleFiles.scan()) {
	const contents = await Bun.file(file).text();
	const result = await sass.compileStringAsync(contents);
	await Bun.write(join(outDir, file.replace('.scss', '.css')), result.css);
}

with a single style.scss file

*,
*::before,
*::after {
  box-sizing: border-box;
}

placed in ./static/styles directory.

The same issue occurs with the sass package, and even when using scanSync and compileString to remove some asynchronous code.

Relevant log output

MyRepo\_Docs on  master [!?] via 🍞 v1.1.12 via  v21.6.2 
❯ bun run build
$ bun build.mts
============================================================
Bun v1.1.12 (43f0913c) Windows x64
ng_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:worker_threads"
Elapsed: 420ms | User: 343ms | Sys: 187ms
RSS: 0.17GB | Peak: 0.17GB | Commit: 0.25GB | Faults: 42050

panic(main thread): Internal assertion failure
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.1.12/wa143f0913AqgggoHghg+L+3pzIwi67F+8vCivprb4o91Qy8tjIww77Rwo13G28vh2CA0eNrzzCtJLcpLzFFILC5OLSrJzM9TSEvMzCktSgUAiSkKPg

error: script "build" exited with code 3

Stack Trace (bun.report)

Bun v1.1.12 (43f0913) on windows x86_64 [AutoCommand]

panic: Internal assertion failure

@Atulin Atulin added the crash An issue that could cause a crash label Jun 15, 2024
@github-actions github-actions bot added the windows An issue that only occurs on Windows label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash windows An issue that only occurs on Windows
Projects
None yet
Development

No branches or pull requests

1 participant