nx-bun
nx-bun copied to clipboard
bun | task worker runner | nx bun: executor @bun-nx/nx:build (and nx target) hang forever after bun successful build
Describe the bug When using @bun-nx/nx:build executor, the build executes correctily, but the nx target run forever and never exit I'm using a mixed environment (node/bun)
To Reproduce
Just execute nx build example-app
from this repo (after nx build nx-bun
of course)
(i didn't tried from a bun-only environment, because the mixed enviromnent is essential for my project)
My build target config:
{
"build": {
"executor": "@nx-bun/nx:build",
"outputs": [
"{options.outputPath}"
],
"defaultConfiguration": "production",
"options": {
"entrypoints": ["apps/flower-care-rpi/src/main.ts"],
"outputPath": "dist/apps/flower-care-rpi",
"tsConfig": "apps/flower-care-rpi/tsconfig.app.json",
"smol": false,
"minify": true,
"bun": true,
"assets": [
"apps/flower-care-rpi/src/assets"
]
}
}
}
My tsconfig.app.json:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["node"]
},
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
}
My tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"rootDir": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"module": "esnext",
"lib": [
"es2020",
"dom"
],
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {},
"types": [
"bun-types"
]
},
"exclude": [
"node_modules",
"tmp"
]
}
Expected behavior The nx target should terminate (with success), so any subsequent targets can run
Additional context
My Environment:
Windows with DevContainer (created from "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye")
Bun version: 1.0.15 (installed with curl -fsSL https://bun.sh/install | bash
)
output of nx list
:
NX Local workspace plugins:
@nx-bun/nx (executors,generators)
NX Installed plugins:
@angular-devkit/build-angular (executors)
@angular/animations ()
@angular/cli ()
@angular/common ()
@angular/compiler ()
@angular/compiler-cli ()
@angular/core (generators)
@angular/forms ()
@angular/language-service ()
@angular/platform-browser ()
@angular/platform-browser-dynamic ()
@angular/router ()
@gnuechtel/nx-cucumber (executors,generators)
@nx-bun/nx (executors,generators)
@nx-tools/nx-container (executors,generators)
@nx/angular (executors,generators)
@nx/devkit ()
@nx/esbuild (executors,generators)
@nx/eslint (executors,generators)
@nx/eslint-plugin ()
@nx/jest (executors,generators)
@nx/js (executors,generators)
@nx/netlify (generators)
@nx/node (generators)
@nx/playwright (executors,generators)
@nx/storybook (executors,generators)
@nx/web (executors,generators)
@nx/workspace (executors,generators)
@schematics/angular (generators)
@storybook/angular (executors)
nx (executors,generators)
NX Also available:
@nx/cypress (executors,generators)
@nx/detox (executors,generators)
@nx/expo (executors,generators)
@nx/express (generators)
@nx/nest (generators)
@nx/next (executors,generators)
@nx/plugin (executors,generators)
@nx/react (executors,generators)
@nx/react-native (executors,generators)
@nx/rollup (executors,generators)
@nx/vite (executors,generators)
@nx/webpack (executors,generators)
Thank you. I will take a look into this later today
Hi @Jordan-Hall do you have an idea when this might be fixed? Still seeing it as an issue when running build 😢
I can't help but notice the assets
option in the your project.json
, I belive assets isn't supported, right? @Jordan-Hall