Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

On Windows, Yeoman generator should stop with error if your NPM version is too old #82

Closed
SteveSandersonMS opened this issue May 18, 2016 · 1 comment

Comments

@SteveSandersonMS
Copy link
Member

NPM < v3 on Windows can't correctly restore the full dependency tree for packages like @angular/*.

If you use these Yeoman generators, you'll eventually end up with an error like:

ERROR in ./ClientApp/boot-client.ts
Module not found: Error: Cannot resolve module 'reflect-metadata' in C:\Users\stevesa\Desktop\spapacktest2\ClientApp
 @ ./ClientApp/boot-client.ts 4:0-27

The underlying cause is NPM not restoring the packages properly, and the solution is to update to NPM 3+. We should prevent things from getting this far by stopping the generator up front if you're on NPM < 3 on Windows.

@SteveSandersonMS
Copy link
Member Author

Note that this will only help partially. Even if your command-line-invoked copy of NPM is 3.x, your VS installation might still invoke NPM 2.x, so you'll still have trouble.

When some version of VS ships that includes NPM 3.x, we might want to check that, if you're on Windows, you have that version of VS (or no version of VS).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant