Bil Abror
SCSWC Community
•Created by Bil Abror on 5/1/2025 in #questions
swc not compatible with bun docker
it's working
it's error
the error
FROM node:22.15.0-slim AS builder
WORKDIR /app
# Install Bun
RUN apt-get update && apt-get install -y curl unzip \
&& curl -fsSL https://bun.sh/install | bash \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="${PATH}:/root/.bun/bin"
# Copy lockfiles and install deps
COPY package*.json bun.lock ./
RUN bun install --frozen-lockfile
# Copy source code
COPY . .
# Build steps
RUN bun run build
FROM node:22.15.0-slim AS builder
WORKDIR /app
# Install Bun
RUN apt-get update && apt-get install -y curl unzip \
&& curl -fsSL https://bun.sh/install | bash \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="${PATH}:/root/.bun/bin"
# Copy lockfiles and install deps
COPY package*.json bun.lock ./
RUN bun install --frozen-lockfile
# Copy source code
COPY . .
# Build steps
RUN bun run build
FROM oven/bun:latest AS builder
WORKDIR /app
# Copy lockfiles and install deps
COPY package*.json bun.lock ./
RUN bun install --frozen-lockfile
# Copy source code
COPY . .
# Build steps (ERROR HERE)
RUN bun run build
FROM oven/bun:latest AS builder
WORKDIR /app
# Copy lockfiles and install deps
COPY package*.json bun.lock ./
RUN bun install --frozen-lockfile
# Copy source code
COPY . .
# Build steps (ERROR HERE)
RUN bun run build
$ swc src -d dist
this.publicInterface = publicInterface;
this.taskQueue = options.taskQueue || new task_queue_1.ArrayTaskQueue();
const filename = options.filename ? (0, common_1.maybeFileURLToPath)(options.filename) : null;
this.options = { ...kDefaultOptions, ...options, filename, maxQueue: 0 };
if (this.options.recordTiming) {
this.runTime = (0, node_perf_hooks_1.createHistogram)();
^
error: Not implemented
at new ThreadPool (/app/node_modules/piscina/dist/index.js:95:50)
at new Piscina (/app/node_modules/piscina/dist/index.js:570:53)
at initialCompilation (/app/node_modules/@swc/cli/lib/swc/dir.js:83:25)
$ swc src -d dist
this.publicInterface = publicInterface;
this.taskQueue = options.taskQueue || new task_queue_1.ArrayTaskQueue();
const filename = options.filename ? (0, common_1.maybeFileURLToPath)(options.filename) : null;
this.options = { ...kDefaultOptions, ...options, filename, maxQueue: 0 };
if (this.options.recordTiming) {
this.runTime = (0, node_perf_hooks_1.createHistogram)();
^
error: Not implemented
at new ThreadPool (/app/node_modules/piscina/dist/index.js:95:50)
at new Piscina (/app/node_modules/piscina/dist/index.js:570:53)
at initialCompilation (/app/node_modules/@swc/cli/lib/swc/dir.js:83:25)
4 replies