Webpack command not found

I have installed webpack using npm install -g webpack and I also installed 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.

What is the role of the package-lock.json?

It stores an exact, versioned dependency tree rather than using starred versioning like package.json itself (e.g. 1.0.*). This means you can guarantee the dependencies for other developers or prod releases, etc. It also has a mechanism to lock the tree but generally will regenerate if package.json changes. From the npm docs: package-lock.json is automatically generated for any operations where npm … Read more

Categories npm