Skip to content

Commit 5be636e

Browse files
mukesh51davideast
authored andcommitted
Update Pre-requisities and troubleshooting section (angular#509)
* Update Pre-requisities and troubleshooting section Updated troubleshooting section to notify the "require" error, while invoking ng serve and modified pre-requisites section to update the order in which angular-cli version is checked. * Update Pre-requisities and troubleshooting section Updated the document as per David's comments.
1 parent c83bd46 commit 5be636e

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

docs/1-install-and-setup.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,10 @@
66

77
### 0. Prerequisites
88

9-
You need the Angular CLI, typings, and TypeScript 2.0. TypeScript 2.0 is required for AngularFire2.
10-
11-
```bash
12-
npm install -g angular-cli@webpack
13-
# or install locally
14-
npm install angular-cli@webpack --save-dev
15-
# make sure you have typings installed
16-
npm install -g typings
17-
npm install -g [email protected]
18-
```
9+
Before you start installing AngularFire2, make sure you have correct version of angular-cli installed.
10+
To verify run the command `ng -v` and ensure you see `angular-cli: 1.x.x-beta.x-webpack.x`.
1911

20-
Verify you have the correct version installed by running `ng -v` and ensuring that you see `angular-cli: 1.x.x-beta.x-webpack.x`. If not, you may need to do the following:
12+
If not, you may need to do the following:
2113

2214
```bash
2315
# if you have the wrong cli version only
@@ -27,6 +19,16 @@ npm uninstall -g angular-cli
2719
npm install -g angular-cli@webpack
2820
```
2921

22+
You need the Angular CLI, typings, and TypeScript 2.0. TypeScript 2.0 is required for AngularFire2.
23+
24+
```bash
25+
npm install -g angular-cli@webpack
26+
# or install locally
27+
npm install angular-cli@webpack --save-dev
28+
# make sure you have typings installed
29+
npm install -g typings
30+
npm install -g [email protected]
31+
```
3032

3133
### 1. Create a new project
3234

@@ -153,7 +155,7 @@ And that's it! If it totally borke, file an issue and let us know.
153155

154156
### Troubleshooting
155157

156-
#### Cannot find namespace 'firebase'.
158+
#### 1. Cannot find namespace 'firebase'.
157159

158160
If you run into this error while trying to invoke `ng serve`, open `src/tsconfig.json` and add the "types" array as follows:
159161

@@ -172,3 +174,12 @@ If you run into this error while trying to invoke `ng serve`, open `src/tsconfig
172174
}
173175
}
174176
```
177+
178+
#### 2. Cannot find name 'require' (This is just a temporary workaround for the Angular CLI).
179+
180+
If you run into this error while trying to invoke `ng serve`, open `src/typings.d.ts` and add the following two entries as follows:
181+
182+
```bash
183+
declare var require: any;
184+
declare var module: any;
185+
```

0 commit comments

Comments
 (0)