With this small blog we tried to introduce npm, webpack and few more libraries that might necessary with these packages and solve error that came while installing webpack. So, starting with basic 🙂
What is npm?
Node Package Manager (NPM) provides Online repositories for node.js packages/modules and Command line utility to install Node.js packages, do version management and dependency management of Node.js packages.
What is webpack?
Webpack is a module bundler, ittakes modules with dependencies and generates static value representing those modules.
To install node js and npm
sudo apt-get update
sudo apt-get install nodejs
or nodejs can be installed from https://nodejs.org/en/
sudo apt-get install npm
to install webpack
npm install webpack-g
On implementing any plugin if we are receiving below error or webpack – extrack-text-webpack-plugin cannot find module
check whether webpack properly install or not if not then install it locally:
npm install webpack
this will Extract text from bundle into a file.
Then run,(this part is optional)
node-sass is a library that provides binding for Node.js to LibSass , It allows us to natively compile .scss files to css speedly and automatically via a connect middleware.