I am following this tutorial - https://www.youtube.com/watch?v=JdGnYNtuEtE
I installed webpack locally
npm i -D webpack
I also installed it globally:
'npm i -g webpack'
It installed just fine.
My package.json
file:
{
"name": "webpack-starter",
"version": "1.0.0",
"description": "Webpack starter project",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "^3.8.1"
}
}
The next command he issues is:
webpack ./src/app.js ./dist/app.bundle
It worked in the videos but I am getting the error:
-bash: webpack: command not found
Why is this happening? Not sure I understand why it isn't working.