Skip to content

Commit 04f257c

Browse files
mukesh51katowulf
authored andcommitted
docs(windows): Adds docs for installing using Angular CLI on Windows.
Document installation for Windows with Angular CLI. This closes #569 and #525
1 parent 86b4b24 commit 04f257c

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

docs/install-angular-cli-windows10.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Installing angular-cli on Windows 10
2+
3+
> There had been installation issues of angular-cli on Windows 10 system. Most of the time these errors are related to Python dependecies and node-gyp.
4+
5+
Something as below :
6+
7+
```bash
8+
[email protected] install C:\Users\User\AppData\Roaming\npm\node_modules\angu
9+
lar-cli\node_modules\angular2-template-loader\node_modules\codecov\node_modules\
10+
execSync
11+
node install.js
12+
13+
[execsync v1.0.2] Attempting to compile native extensions.
14+
{ [Error: spawn node-gyp ENOENT]
15+
code: 'ENOENT',
16+
errno: 'ENOENT',
17+
syscall: 'spawn node-gyp',
18+
path: 'node-gyp',
19+
spawnargs: [ 'rebuild' ] }
20+
[execSync v1.0.2]
21+
Native code compile failed!!
22+
Will try to use win32 extension.
23+
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie h
24+
ttps://nodesecurity.io/advisories/130
25+
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher
26+
to avoid a RegExp DoS issue
27+
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher
28+
to avoid a RegExp DoS issue
29+
30+
[email protected] install C:\Users\User\AppData\Roaming\npm\node_modules\a
31+
ngular-cli\node_modules\compression-webpack-plugin\node_modules\node-zopfli
32+
node-pre-gyp install --fallback-to-build
33+
.......................
34+
```
35+
36+
To resolve this issue, make sure you're upgraded to latest version of **NPM** and try installing angular-cli. This seems to have worked on certain scenarios.
37+
38+
If the above doesn't works then the below steps should help. Please ensure all the commands are executed as an **Administrator**.
39+
40+
### Steps:
41+
42+
### 1) Install node-gyp from [here](https://github.com/nodejs/node-gyp)
43+
44+
```ts
45+
npm install -g node-gyp
46+
```
47+
48+
### 2) Install Windows build tool from [here](https://github.com/felixrieseberg/windows-build-tools)
49+
50+
```ts
51+
npm install --global windows-build-tools
52+
```
53+
54+
*This will also install python
55+
56+
### 3) Install Angular-CLI
57+
58+
npm install -g angular-cli
59+
60+
This should install angular-cli without errors.
61+
62+
#### Post this installation, follow the installation [guide](https://github.com/angular/angularfire2/blob/master/docs/1-install-and-setup.md) to install AngularFire2 and everything should work as expected.
63+
64+
65+
### Note:-
66+
When you start your app using "ng serve" in the console, you might still see the below errors. Despite these errors, the application should work as expected and should be able to talk to Firebase.
67+
68+
```ts
69+
70+
ERROR in [default] C:\angularFire2Test\node_modules\angularfire2\interfaces.d.ts:12:34
71+
Cannot find namespace 'firebase'.
72+
73+
ERROR in [default] C:\angularFire2Test\src\typings.d.ts:6:12
74+
Subsequent variable declarations must have the same type. Variable 'require' must be of type 'NodeRequire',
75+
but here has type 'any'.
76+
77+
ERROR in [default] C:\angularFire2Test\src\typings.d.ts:7:12
78+
Subsequent variable declarations must have the same type. Variable 'module' must be of type 'NodeModule',
79+
but here has type 'any'.
80+
81+
```

0 commit comments

Comments
 (0)