Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR in multi main, Module not found: Error: Can't resolve 'webpack-dev-server/client?http://localhost:4200/' in 'node_modules\angular-cli\ models'

I Am new in Angular2 Cli, Here I found an errors while running my Cli project.

ERROR in multi main, Module not found: Error: Can't resolve 'webpack-dev-server/client?http://localhost:4200/' in 'node_modules\angular-cli\ models'

I have installed 'webpack' and 'webpack-dev-server' globally, but still the error remain.

Any body, please help me to find a solution.

Thanks,

like image 982
vipin Avatar asked Oct 27 '16 09:10

vipin


2 Answers

You don't need to install webpack nor webpack-dev-server globally. They come installed by CLI.

I had the same issue today. And I discovered that I was using an old shell session that was using Node v4. After upgrading to a newer version of Node (v6). I had no more issue.

like image 166
Wassim Chegham Avatar answered Oct 17 '22 00:10

Wassim Chegham


Upgrade your node

https://nodejs.org/en/

Install

npm cache clean

npm update -g

npm install -g ember-cli

Then delete your old project and run commands again

npm install -g angular-cli

ng new my-new-app

cd my-new-app

ng serve
like image 44
vaquar khan Avatar answered Oct 16 '22 23:10

vaquar khan