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 Adding CSS Loaders

Jonathan Prada
Jonathan Prada
7,039 Points

npm start - Module not found, cannot resolve style.css

Hi, i was following the videos just fine until i got stuck here. This is the error shown by the web server:

ERROR in ./app.js Module not found: Error: Can't resolve '/css/style.css' in 'C:\mamp\htdocs\project' @ ./app.js 11:0-2

Please help

1 Answer

Jonathan Dewitt
Jonathan Dewitt
8,101 Points

Did you make sure to install the needed npm modules, style-loader and css-loader?

npm install --save-dev style-loader css-loader

Also, double check your webpack.config.js file to make sure it matches the instruction, specifically lines 18-19.