cgross / generator-cg-angular15

Yeoman Generator for Enterprise Angular 1.5 Projects with Typescript, Webpack, and Sass.
MIT License
33 stars 3 forks source link

Webpack Issue #8

Open SamarRizvi opened 7 years ago

SamarRizvi commented 7 years ago

Please update the webpack config to comply with the latest webpack version, as by default the latest webpack and webpack-dev-server is installed. Due to the current webpack config, webpack dev serv er is unable to start.

VivaLaPanda commented 7 years ago

This is an issue for me as well.

VivaLaPanda commented 7 years ago

I have a temporary patch for this. The issue is that Yarn doesn't grab the correct version of webpack-dev-server. We just need to modify Yarn to do so.

First, go to your Yarn's global config (~/AppData/Local/Yarn/config/global on Windows). In that file, modify package.json to have these version numbers:

    "webpack": "^1.13.1",
    "webpack-dev-server": "^1.16.4",

Then delete both the webpack and webpack-dev-server from the node_modules in the same directory. Now just run yarn install. Yarn will fetch the old versions correctly. Now the serve command will work as intended.

Really though the generator just needs to be updated to new Webpack.

bolora commented 6 years ago

That worked but I agree, the generator needs to be fixed... I don't know enough about Webpack/yarn - from the error it looks like a problem with the package.json for starters