Sure, thanks!
Ken Guie
1

This section of your package.json file is your npm scripts:

“scripts”: {
“start”: “node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js”,
“test”: “mocha — compilers js:babel-core/register — require ./test/test_helper.js — recursive ./test”,
“test:watch”: “npm run test — — watch”
}

You have 3 scripts, start , test , and test:watch . These are what is known as aliases, or shortcut commands that you can run in your terminal. The are preceded with the npm command:

npm start
npm test

Running npm start is just a shortcut for node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js .

Something that jumps out at me right away is your startscript. If you look at the webpack-dev-server docs on GitHub, you’ll see a quick way to get it up and running:

node_modules/.bin/webpack-dev-server

Compare that with your command:

node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js

See the difference?

Also, before I continue I just want to show you a cool little bit of info:

In package.json you don’t need to specify absolute paths in npm scripts . Instead of:

node_modules/.bin/webpack-dev-server

You can just write:

webpack-dev-server

package.json localizes your node_modules for you.

So, before you go any further try to switch up your npm start script to look like this:

"start": "webpack-dev-server"

Also, you are saying that you are fairly knew to this. I wouldn’t recommend jumping into a boilerplate, especially a heavy one with many dependencies, when you are just starting out. Start with one piece of technology at a time and use it until it makes sense. Don’t add anything else unless you absolutely need to. create-react-app is so awesome because it abstracts away all of the unnecessary boilerplate and lets you work with pure React with no configuration necessary.

Let me know if you have any more questions! :)

Like what you read? Give Jake Wiesler a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.