Follow these steps one by one to resolve the error
npm i -g @angular/cli@latest
rm -rf node_modules / rd /s /q node_modules
npm cache clear --force
npm cache verify
npm uninstall webpack
npm install --save-dev --save-exact @angular/cli@latest
You might get below error also
npm remove webpack -g
npm i webpack --save-dev
109 total views, no views today
Step 1 : Installing Nodejs
To access to the Node Package Manager (NPM) and run our server, we need to first install Nodejs.
You may already have it installed. To check whether it’s installed, visit your console and type:
If it goes unrecognized, you will need to visit Nodejs.org
and visit the downloads page. Choose the installer appropriate for your OS, and install it.
Once complete, reload your console/command line, and re-run the
This time it should provide you with the version installed.
Step 2: Installing Angular
We’re going to use the Angular CLI to create our Angular app. Let’s install it at the command line through NPM.
npm install @angular/cli -g
Give it some time to install once installed go into the any folder where you prefer to store your projects and then run the following command:
ng new mean
Once you’re in the new project folder, we’re going to run a command with the Angular CLI that will create a build of our project. We need to do this because our server is going to look for a /dist folder to serve the files. Run below command to build your project.
Now Run the Angular 2 application by typing below command.
Now, open the browser then go to
you should see angular page.
Close the running Angular app first by press ctrl+c
90 total views, no views today