angular-cli: Angular-cli just does not work on Windows/Visual Studio, period.

You guys don’t ever test anything on Windows/Visual Studio probably, otherwise I just can’t understand how you can work with something broken this much. Just trying to setup hello-world project with angular-cli for half a day now but can’t get to the working NG command.

Here is my setup: Windows 10; Visual Studio 2015.3; Node v5.4.1; NPM v3.10.7; Python 2.7; All clean install, clean system without errors.

Here are my steps:

npm install -g https://github.com/angular/angular-cli.git

As I want to get the latest version (that plays with RC6), I have to install directly from github.

First comes the bunch of errors about missing peer dependencies! The readme says that you have to just install “npm install -g angular-cli” and that’s all. Well, after above command, there are bunch of unmet peer dependency warnings, which you have to install one after another, some of them requiring conflicting versions (typescript 1.8, 1.9 and 2.0 were all requested by different “peers”).

To install peer dependencies, I run:

npm install -g zone.js rxjs@5.0.0-beta.11 tslint @angular/platform-server @angular/core @angular/common @angular/compiler @angular/platform-browser webpack@^2.1.0-beta.22

Many errors go away, but there are still some peer dependencies that just can’t be cured. When I run “npm list -g --depth=0” I get these:

npm ERR! peer dep missing: rxjs@5.0.0-beta.11, required by @angular/core@2.0.0-rc.6 npm ERR! peer dep missing: typescript@^1.9.0-dev, required by @angular/tsc-wrapped@0.2.2 npm ERR! peer dep missing: webpack@1.x.x || 2.x.x, required by string-replace-loader@1.0.3 npm ERR! peer dep missing: typescript@^1.8.0 || ^1.9.0-dev, required by tsickle@0.1.6

Even though I explicitly (and successfully) installed rxjs@5.0.0-beta.11 and webpack@^2.1.0-beta.22, and that very same versions are listed by “npm list -g”, it still reports the “peer dep missing” on them.

Ok, maybe this is the way it should be - I think, maybe the angular-cli will work regardless… NOPE.

when I run anything with NG (like ng help), it gives an error:

Error while running script “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\node_modules\angular-cli\addon\ng2\models\webpack-build-common.ts”: Error: Cannot find module ‘@angular-cli/base-href-webpack’ at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\node_modules\angular-cli\addon\ng2\models\webpack-build-common.ts:7:27) at Module._compile (module.js:397:26) at Object.require.extensions…ts (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\node_modules\angular-cli\lib\bootstrap-local.js:30:14) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) … AND SO ON

This thing just does not work with Windows / Visual Studio. You should have written this in your readme with BIG RED TEXT. I appreciate the work that you are doing, I’m very grateful for what you’ve built and I really think that Angular 2 is a fascinating platform really, but… I’ve wasted DAYS to understand all these systemjs/webpack/angular-cli/whatever ways of building Angular 2 project, just to get to the hello-world example, but 9 out of 10 instructions that are given in docs simply don’t work out of the box. I’m not even mentioning bunch of intermediate errors and workarounds that I had to overcome just to get to that point.

Is it really hard, to put down a simple, step-by-step instructions for angular-cli, on Windows/Visual Studio (clean install!) for example?.. What’s the point with all your unit testing, integration testing, wudu dancing, if even the hello-world project can’t be built on a clean system, even after following all those 2999 steps?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 6
  • Comments: 31 (7 by maintainers)

Most upvoted comments

@kylecordes The situation is exactly dire because, it is not actually a technical/physical problem, as much as it is a negligence from core developers to the general public. I’m pretty sure contributing devs themselves do not have these problems because they solved them once for their own rig, with dirty workaround here, dirty workaround there, and once they got their setup working, they just focus on their daily job. But, there are thousands of devs from “general public” (like me), who are just trying to switch to Angular 2, trying to RTFM over and over again, just to taste the Angular 2 as it has been demoed in numerous webcasts, conferences, and blogs, but… there are so many unnecessary barriers to get the base scenario working! Being mostly a backend developer (MS-technology-stack-based) originally, its already challenging for me to wrap my head around so many new concepts, so complicated frontend build scenarios, etc, but I really am intrigued by the power of Angular 2, and eager to make a switch to it (from ASP.NET MVC) no matter the learning curve. I imagine there are thousands of devs just like me. But is it hard for somebody that got it working already, to share the basic steps necessary and write it into the readme with big bold font?

Take the peer dep missing error for example. I’m sure it’s not dependent on my particular system, you should have these warnings on any system right now. Three different versions of typescript are requested by different dependencies. How do you solve them? Should I ignore that?

And then that fatal error that pops with every NG command execution: Cannot find module '@angular-cli/base-href-webpack'. This thing is just so easy to repro! Just npm install the version from HEAD right now and you have that error. If I install the one from npm official registry, it is outdated (not RC6) and there are no instructions how (and whether at all) can we update from it.

Can anybody write a steps required to setup everything on Windows so that I could ng new an RC6 project? No? Maybe later? When? It has been like more than two weeks after RC6 release, and I’ve been visiting this repo every evening and every morning since, but couldn’t find a clear way to make it work with Angular-CLI. There are no milestones, no blog posts, the readme hasn’t been properly updated for ages, the changelog is from August and says “beta.11-webpack.3”, while everybody mentions “beta.11-webpack.8”. There have been 5 releases since? Why don’t you make a version that just updates to RC6 and publish it to npm? Why should we hack with repo directly to get updates? I imagine it should not take more than few hours to proper people involved to update it to RC6 and publish to npm? Well certainly not 15 days (and counting)?? RC6 did NOT bring any breaking functionality changes per se, so what’s the problem?

I see what is the problem. The problem is that you just don’t realize that there are thousands of devs watching and waiting day after day, just to play with latest versions, and “sometimes in the future” is not the proper date to give them, when actually you can waste few hours of yours to write proper instructions and save thousands of hours collectively for those who really can’t hack it themselves. Just please be more responsible to the public…

Wtf. This seems to turn into team bashing. Stop it please.

Yes, it’s hard to use on windows ( no experience with other platforms), Yes it’s hard to understand why.

But keep calm. It’s still beta!

The situation is not quite as dire as it may seem in this issue thread. The current challenge (and actually a challenge over the last couple of months) is that CLI has been shipping with various floating dependencies, into the Node ecosystem where semver is assumed by versioning system, but not given as much attention as it would need by package developers who very frequently ship breaking changes in minor versions.

I imagine the CLI team would like to be able to respond to these breakages with the new CLI versions immediately, but they are also trying to absorb new versions of Angular itself. I’m hoping that between the rapidly settling churn in Angular, and hopefully an increased respect for the tendency of node packages to break, we will end up with a stable CLI in the near future. Where stable means that “ng new” continues to give a working application, on all major platforms, for an extended period of months.

The angular-cli team is juggling a whole heap of fast moving dependencies. So other than keeping the tone civil, it would be preferable to separate out what is platform vs tooling specific. Yes, there have been some opportunities as of late to keep things smoother…

However, developing on a Windows 10 machine, there is not a single issue I had to look into with the webpack.8 version that other platforms had not flagged as well.

If the issue is related to getting it to work with Windows tooling, try VS Code instead of Visual Studio. Maybe some of the sting you seem to experience is resolved that way. Lightweight works & like a charm.

As I commented above I see no merit in the statement that cli does not work on Windows. It is difficult to stay on top of the changes(angular rc7 today!) but the issues in my experience are the same on Windows and Mac. I have had no windows specific issues…

npm i -g angular-cli@1.0.0-beta.11-webpack.2 was the only way to get it work again.

Please fix the windows problems!

And now that Angular itself is updated to RC7, trying to update a working project is a decent into hades. Just update the package.json and reinstall, right? Nope. Errors all up and down.

Not to mention a brand new, blank project, using the master version of the CLI insists on using an old beta of webpack - webpack beta.21 - even though beta.22 is specified in all the package.json files.

Ugh. What holy hell this is turning out to be.

Global package:

npm uninstall -g angular-cli npm cache clean npm install -g angular-cli@webpack

Local project package:

commit any changes you have to git first

rm -rf node_modules dist tmp typings npm install --save-dev angular-cli@webpack