Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialOsama Awan
Courses Plus Student 8,676 PointsWebpack Output filename not configured
first of all i'm using windows when i type webpack in cmd and hit enter it gives an error "Output filename not configured" i have checked my webpack.config.js file and everything is ok and i'm using webpack from node_modules/.bin
module.exports = {
entry: './app.js',
output: {
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
]
}
};
1 Answer
annekotecha
4,364 PointsI also had the error message of "Output filename not configured". I worked out it was down to typos. In my webpack.config.js file I had an extra trailing space in './app.js' and in the.babelrc files I had omitted the final curly brace. Once I fixed these types I could run "node_modules/.bin/webpack" succesfully. I did not need to change the 'test' variable in the package.json file nor run "npm run webpack"
Osama Awan
Courses Plus Student 8,676 PointsOsama Awan
Courses Plus Student 8,676 PointsI have figured out the solution you have to add "webpack": "webpack" inside your package.json file under 'test" property, and you just have to run "npm run webpack" (without quotes) from your project folder, for example: E:\scoreboard> npm run webpack