Open rmoorman opened 1 year ago
Having a similar issue, right now I get:
#19 9.035 [vite:css] Failed to load PostCSS config (searchPath: /build): [EBADF] Bad file descriptor
#19 9.035 undefined
#19 9.035 file: /build/src/assets/fonts/Poppins.css
after running bun run build
which runs vite build
under the hood
Yep, one more here, I think the same issue with Vite and PostCSS config
bun run --bun dev
$ vite
[0.55ms] ".env"
Failed to load PostCSS config: Failed to load PostCSS config (searchPath: /frontend): [EBADF] Bad file descriptor
undefined
code: "EBADF"
syscall: "fstat"
errno: -9
Similar issue when vite build
is running from oven/bun
docker image.
Failed to load PostCSS config: Failed to load PostCSS config (searchPath: /app): [EBADF] Bad file descriptor
undefined
code: "EBADF"
syscall: "fstat"
errno: -9
Same issue here with Docker:
Failed to load PostCSS config: Failed to load PostCSS config (searchPath: /root/apps/web): [EBADF] Bad file descriptor
undefined
code: "EBADF"
syscall: "fstat"
errno: -9
Checked 1.0.4, still doesn't work.
What version of Bun is running?
1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983
What platform is your computer?
Linux 5.4.0-156-generic x86_64 x86_64
What steps can reproduce the bug?
Take for example the following example repository https://github.com/rmoorman/bun-postcss-issue-20230911-example
There I created two directories,
via-npm-esbuild
to demonstrate the used plugin in it's default setting (node, npm, esbuild), andvia-bun
to try to use bun to do the same.When
node build.js
is run in thevia-npm-esbuild
directory, the files inbuild
are updated. The generatedbuild/style.css
file also contains a vendor prefixed version of the::placeholder
CSS rule, which shows that autoprefixer is also working through postcss.When
bun run build.js
is executed in thevia-bun
directory, nothing is built. Thelogs
(returned from bun's build function) mentions that there is an issue finding thestyle.css
file though. I think that resolving thestyle.css
file is the issue because commenting the import line insrc/index.js
causes the build script to successfully output something in thebuild
directory.What is the expected behavior?
That
bun run build.js
(given it is run in thevia-bun
directory of the example repo with all dependencies installed) will successfully bundle javascript and styles (through postcss).What do you see instead?
No output in the configured
build
directory and an error in the logs:Additional information
It is mentioned in the docs that (even though incomplete) bun aims to support esbuild style plugins. When something is not working, the documentation also states that one should report it, so here I am, reporting my findings.
If there are any questions on how to reproduce this or anything I can do to help resolving the issue, feel free to ask, of course.