Webpack command not found

Bishnu Bhattarai picture Bishnu Bhattarai · Jun 30, 2017 · Viewed 58.9k times · Source

I have installed webpack using

npm install -g webpack

and

npm install webpack 

I also installed webpack-dev-server

npm install -g webpack-dev-server

After completion of installation, I ran the command webpack but, it shows below error

webpack: command not found

I am not getting what is the error.

Answer

Natesh bhat picture Natesh bhat · Dec 10, 2017

Your webpack exists in ./node_modules/.bin/ folder . So you should execute this command :

./node_modules/.bin/webpack

Check out the answer in this thread .

webpack command not working