oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
72.99k stars 2.66k forks source link

gulp behavior with bun #5923

Open noraj opened 11 months ago

noraj commented 11 months ago

What version of Bun is running?

1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a

What platform is your computer?

ArchLinux Linux 6.5.3-arch1-1 x86_64 unknown

What steps can reproduce the bug?

What is the expected behavior?

With nodejs 20.2.0

 npm run build                                                                                                                                                                                               [10/26]

> rawsec-cybersecurity-list@1.0.0 build                                                                                                                                                                              
> gulp                                                                                                                                                                                                               

[20:28:43] Using gulpfile ~/Dev/rawsec-cybersecurity-inventory/gulpfile.mjs                                                                                                                                          
[20:28:43] Starting 'default'...                                                                                                                                                                                     
[20:28:43] Starting 'clean'...                                                                                                                                                                                       
[20:28:43] Finished 'clean' after 8.57 ms                                                                                                                                                                            
[20:28:43] Starting 'build'...                                                                                                                                                                                       
[20:28:43] Starting 'pug_data'...                                                                                                                                                                                    
[20:28:43] Finished 'pug_data' after 884 ms                                                               
[20:28:43] Starting 'count_items'...                                                                      
[20:28:43] Finished 'count_items' after 769 μs                                                            
[20:28:43] Starting 'pug_src'...                                                                          
Number of items: 1382                                                                                     
[20:28:45] Finished 'pug_src' after 2 s                                                                   
[20:28:45] Starting 'api_clean'...                                                                        
[20:28:46] Finished 'api_clean' after 328 ms                                                              
[20:28:46] Starting 'api_build'...                                                                        
[20:28:46] Finished 'api_build' after 236 ms                                                              
[20:28:46] Starting 'api_copy'...                                                                         
[20:28:47] Finished 'api_copy' after 1.34 s
[20:28:47] Starting 'bulma'...      
[20:28:47] Starting 'bulmajs'...              
[20:28:47] Starting 'tablefilter'...
[20:28:47] Starting 'sweetalert2'...
[20:28:47] Starting 'jquery'...        
[20:28:47] Starting 'minisearch'...
[20:28:47] Starting 'js'...                 
[20:28:47] Starting 'fontawesome'...
[20:28:47] Starting 'font_mfizz'...         
[20:28:47] Starting 'images'...  
[20:28:47] Starting 'css'...               
[20:28:50] Finished 'sweetalert2' after 2.81 s
[20:28:50] Finished 'jquery' after 2.81 s
[20:28:50] Finished 'css' after 2.81 s
[20:28:50] Finished 'bulma' after 2.84 s
[20:28:50] Finished 'bulmajs' after 2.84 s
[20:28:50] Finished 'minisearch' after 2.86 s
[20:28:50] Finished 'font_mfizz' after 3.03 s
[20:28:50] Finished 'images' after 3.07 s
[20:28:51] Finished 'tablefilter' after 3.35 s
[20:28:51] Finished 'js' after 3.52 s
[20:28:51] Finished 'fontawesome' after 3.56 s
[20:28:51] Finished 'build' after 8.35 s
[20:28:51] Finished 'default' after 8.36 s

What do you see instead?

With bun 1.0.3, bun 1.0.8

$ bun run build    
$ gulp
[20:30:03] Using gulpfile ~/Dev/rawsec-cybersecurity-inventory/gulpfile.mjs
[20:30:03] Starting 'default'...
[20:30:03] Starting 'clean'...
[20:30:03] The following tasks did not complete: default, clean
[20:30:03] Did you forget to signal async completion?

Additional information

node:Console issue has been fixed #4737 but gulp is still not running.

noraj commented 10 months ago

Docker container for testing

FROM oven/bun:1.0.8

COPY data ./
COPY img ./
COPY js ./
COPY make-scripts ./
COPY pug ./
COPY sass ./
COPY bun.lockb ./
COPY gulpfile.mjs ./
COPY package.json ./

RUN bun install
RUN bun run build
CMD ["bun", "run", "server"]

# docker build -t bun-gulp .
# docker run bun-gulp:latest
# docker exec -it fdbc0eb5eeca bash
# root@fdbc0eb5eeca:/home/bun/app# bun run build

steps:

git clone https://gitlab.com/rawsec/rawsec-cybersecurity-list.git && cd awsec-cybersecurity-list
git checkout dev
docker build -t bun-gulp .
docker run bun-gulp:latest
docker exec -it fdbc0eb5eeca bash
root@fdbc0eb5eeca:/home/bun/app# bun run build
root@fdbc0eb5eeca:/home/bun/app# bun run build
$ gulp
[15:08:39] Using gulpfile /home/bun/app/gulpfile.mjs
[15:08:39] Starting 'default'...
[15:08:39] Starting 'clean'...
[15:08:39] The following tasks did not complete: default, clean
[15:08:39] Did you forget to signal async completion?
long76 commented 5 months ago

the same with bun 1.0.35

long76 commented 5 months ago

the same with bun 1.0.35

last worked version 1.0.30

1337hero commented 2 months ago

Bun seems to have file permission errors with Gulp. Been dealing with this all morning. Slightly different, but same deal.

27rogi commented 2 weeks ago

I encountered same issue, I got it somehow resolved by doing this

gulp.task("optimize", (done) => {
    return gulp.src("./assets/img/**/*")
        // ...do some things
        .pipe(gulp.dest("./output"))
        .on("finish", () => done())
})