Output filename not configured error from Webpack

I couldn't find an answer to this simple issue, so I thought I'd quickly post one myself.

Whilst creating a new ReactJS app, I wanted to use Webpack to build all of my modules into a single bundle.

I had installed it globally by running npm install webpack -g and I had included it in my project by running npm install webpack --save-dev.

However, on running the webpack command, I was seeing the following output:
Output filename not configured.

The solution

Turns out it was simple. I had missed the s from my module.exports line:
module.export = App;
//Should be
module.exports = App;
Adding the missing character solved the issue!


Andres commented on

Lol. Thanks

Hosain commented on

Lol. Thanks a lot. Wasted lots of time because of this.

Aman commented on

hahaha Same here :P Shame !

Tom commented on

haha...just spent to last 1/2 hour trying to debug this! Cheers

Ashwin commented on

Thanks a lot !!

Katie commented on

Turns out you also get that error line if you try to run webpack from the wrong directory. I tried to run it from one level down inside my repo (instead of from the root level where package.json & the config files live) and I saw:

> webpack
webpack 1.12.14
Usage: https://webpack.github.io/docs/cli.html

--help, -h, -?
-- <etc etc> ...

Output filename not configured.

Cav commented on

Thanks so much dude :D

Guest commented on

Good catch!

vvalgis commented on

Big thanks to you for your post.

Mohan commented on

I once had space in front of webpack.config.js, Once I corrected, It worked.

bradma commented on

Thanks! lol ran into the same thing... Saved me time

Russ commented on

Thanks Just ran into same issue!

Alex commented on

I named my config file webpack.conf.js instead of webpack.config.js once, and got the same error.

Masbagal commented on

Thank you! I laughed at myself after finding the same error and the same solution.

raju commented on

thanks In my case the issue was.. incorrect file name.. i was using app.bundle instead of app.bundle.js

Kostya commented on

Oh my God. Thank you!

Rio commented on

Thanks, bro!

Devdutta Natu commented on

Thanks a lot man.that thing is not easily traceable.

Tan commented on

Hey Thanks, I feel stupid.

virendra commented on

silly mistake, thanks bro :)
Comments have been closed for this post