Git Product home page Git Product logo

Comments (5)

jpgcodecr avatar jpgcodecr commented on June 24, 2024

I'm having the exact same issue, by chance were you able to find a workaround?

from webpack-stream.

DenisLopatin avatar DenisLopatin commented on June 24, 2024

@jpgcodecr yes I could, I started using webpack for scripts build xd. I really don't understand what happened

from webpack-stream.

gumby0q avatar gumby0q commented on June 24, 2024

Hi,
have the same thing but with error handling.

const stream2 = gulp.src([
    './src/js/index.js',
  ])
      .pipe(webpack(
          config,
          compiler,
          function (err, stats) {
            console.log('webpack stats');
            console.log('test error', err);
            /* Use stats to do more things if needed */
          })
          .on('error', function (err) {
            if (buildArgs.env === 'production') {
              console.error("stop build!!!");
            } else {
              console.error("DO NOT stop build!!!");
              this.emit('end'); // Don't stop the rest of the task
            }
          })

it seems that events aka this.emit('end') do not work on node >= 14

from webpack-stream.

jmcphers avatar jmcphers commented on June 24, 2024

FWIW, I also hit this error and it was infuriating to debug. It turned out to be due to this code:

webpack-stream/index.js

Lines 258 to 266 in 35b771e

// If entry point manually specified, trigger that
const hasEntry = Array.isArray(config)
? config.some(function (c) { return c.entry; })
: config.entry;
if (hasEntry) {
stream.end();
}
return stream;

In particular, webpack-stream doesn't end the stream unless the webpack config has an entry point defined. Mine didn't (my fault), so the stream was never closed and this eventually caused the async to never complete.

Fix: define an entry in the webpack config.

from webpack-stream.

someguy20336 avatar someguy20336 commented on June 24, 2024

I just ran into this as well and I cannot figure out what is going on. It isn't the lack of entry, as I have that defined.

I am trying to upgrade from node 16 (webpack-stream v5.2.1) to node 18 (webpack-stream v7). It works on v5, but I get this error on v7 and nothing is generated.

I tried the bare minimum configuration - a single typescript file in entry and ts-loader. Still doesn't signal completion.

Running webpack from the webpack cli works, so it isn't something with my config or webpack itself.

I have no idea how to debug this to give you any more information, but if you have ideas let me know. Probably will end up not using it anymore if we can't get it figured out here, given webpack cli itself works. Would really love to not have to rewrite my gulpfile though.

from webpack-stream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.