ericclemmons / start-server-webpack-plugin

Automatically start your server once Webpack's build completes.
MIT License
158 stars 26 forks source link

webpack 4 bug TypeError: Cannot read property 'existsAt' of undefined #33

Open sibelius opened 5 years ago

sibelius commented 5 years ago
/Users/sibelius/Dev/entria/app/node_modules/start-server-webpack-plugin/dist/StartServerPlugin.js:120
    const existsAt = compilation.assets[name].existsAt;
                                              ^

TypeError: Cannot read property 'existsAt' of undefined
    at StartServerPlugin.startServer (/Users/sibelius/Dev/entria/app/node_modules/start-server-webpack-plugin/dist/StartServerPlugin.js:120:47)
    at StartServerPlugin.afterEmit (/Users/sibelius/Dev/entria/app/node_modules/start-server-webpack-plugin/dist/StartServerPlugin.js:90:10)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/sibelius/Dev/entria/app/packages/main/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:14:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/sibelius/Dev/entria/app/packages/main/node_modules/tapable/lib/Hook.js:154:20)
    at asyncLib.forEach.err (/Users/sibelius/Dev/entria/app/packages/main/node_modules/webpack/lib/Compiler.js:354:27)
    at /Users/sibelius/Dev/entria/app/packages/main/node_modules/neo-async/async.js:2825:7
    at done (/Users/sibelius/Dev/entria/app/packages/main/node_modules/neo-async/async.js:2861:11)
    at /Users/sibelius/Dev/entria/app/packages/main/node_modules/neo-async/async.js:2813:7
    at /Users/sibelius/Dev/entria/app/packages/main/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqWrap.oncomplete (fs.js:141:20)
wmertens commented 5 years ago

Can you try the @beta version?

On Tue, Nov 20, 2018 at 8:41 PM Sibelius Seraphini notifications@github.com wrote:

/Users/sibelius/Dev/entria/app/node_modules/start-server-webpack-plugin/dist/StartServerPlugin.js:120 const existsAt = compilation.assets[name].existsAt; ^

TypeError: Cannot read property 'existsAt' of undefined at StartServerPlugin.startServer (/Users/sibelius/Dev/entria/app/node_modules/start-server-webpack-plugin/dist/StartServerPlugin.js:120:47) at StartServerPlugin.afterEmit (/Users/sibelius/Dev/entria/app/node_modules/start-server-webpack-plugin/dist/StartServerPlugin.js:90:10) at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/sibelius/Dev/entria/app/packages/main/node_modules/tapable/lib/HookCodeFactory.js:32:10), :14:1) at AsyncSeriesHook.lazyCompileHook (/Users/sibelius/Dev/entria/app/packages/main/node_modules/tapable/lib/Hook.js:154:20) at asyncLib.forEach.err (/Users/sibelius/Dev/entria/app/packages/main/node_modules/webpack/lib/Compiler.js:354:27) at /Users/sibelius/Dev/entria/app/packages/main/node_modules/neo-async/async.js:2825:7 at done (/Users/sibelius/Dev/entria/app/packages/main/node_modules/neo-async/async.js:2861:11) at /Users/sibelius/Dev/entria/app/packages/main/node_modules/neo-async/async.js:2813:7 at /Users/sibelius/Dev/entria/app/packages/main/node_modules/graceful-fs/graceful-fs.js:45:10 at FSReqWrap.oncomplete (fs.js:141:20)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ericclemmons/start-server-webpack-plugin/issues/33, or mute the thread https://github.com/notifications/unsubscribe-auth/AADWlpjVNIXTyq50Jb1y3xcfKZFaFrvVks5uxFsFgaJpZM4YrzQz .

Magneticmagnum commented 5 years ago

Whats your configuration look like?

madebyherzblut commented 5 years ago

In case anyone runs into the same issue: Check that your output.filename in your webpack config matches the name in your StartServerPlugin config.