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 trial

JavaScript Configuring Webpack

Nathan LaBrake
Nathan LaBrake
24,088 Points

In Windows it just says 'node_modules' is not recognized as an internal or external command...

How do you do this in Windows??

I've tried the run command, I've tried using node_modules/.bin/webpack, node_modules/.bin/webpack.cmd, etc.

What works in Windows?

Thanks, Nathan

2 Answers

Seth Kroger
Seth Kroger
56,413 Points

You should have installed webpack with the -g flag so it's installed globally for use and not just in a single project. You run by just typing webpack without and path.

Nathan LaBrake
Nathan LaBrake
24,088 Points

Hey Seth,

I actually found that in Windows you have to type the full path (including C:...) to execute files. So I got it working by typing the full path.

In this tutorial they show you how to work with webpack when it's installed locally, so I wanted to make sure I could do it without it being global.

Thanks for the input.