Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Building Applications with React and Redux Getting Started with Redux Redux Initial Setup - index.js

Error when run "npm start"

Hi, Please help me with this, I keep getting this error when run "npm start" after "npm install". I have tried to update or lower webpack versions as well but there are different errors came up.

npm start

react-redux-course@1.0.0 prestart C:\Users\Nam Tran\Documents\GitHub\react-redux-course npm run lint

react-redux-course@1.0.0 lint C:\Users\Nam Tran\Documents\GitHub\react-redux-course eslint ./src/*/.{js, jsx} --fix

react-redux-course@1.0.0 start C:\Users\Nam Tran\Documents\GitHub\react-redux-course webpack-dev-server --progress --inline --hot

× 「wds」: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration.module has an unknown property 'loaders'. These properties are valid: object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp? } -> Options affecting the normal modules (NormalModuleFactory). npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-redux-course@1.0.0 start: webpack-dev-server --progress --inline --hot npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-redux-course@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Nam Tran\AppData\Roaming\npm-cache_logs\2019-09-16T02_52_41_029Z-debug.log

2 Answers

Dylan Thunn
Dylan Thunn
22,658 Points

I would try and go through the first part of the video setting up the index.js and what not again, can not tell by your code but it has to be something you did wrong setting up.

Torben Korb
seal-mask
PLUS
.a{fill-rule:evenodd;}techdegree seal-36
Torben Korb
Front End Web Development Techdegree Graduate 90,071 Points

Hi Nam,

it seems like there is an older webpack config in your project. Webpack changed the way loaders are called in the config file. Instead of "loaders" you should try to name your property "rules".

See this StackOverflow post: https://stackoverflow.com/questions/49370849/configuration-module-has-an-unknown-property-loaders

Hopefully this helps you solve your problem! Happy coding!