Skip to content

Commit de06784

Browse files
authored
docs: correctly generate API docs for tsdoc comments (#2692)
1 parent 8fb98dd commit de06784

File tree

9 files changed

+350
-566
lines changed

9 files changed

+350
-566
lines changed

README.md

Lines changed: 76 additions & 336 deletions
Large diffs are not rendered by default.
File renamed without changes.

docs/CHANGES_4.0.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changes in 4.x
2+
3+
WIP

docs/native-extensions.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Native Extensions
2+
3+
The `kerberos` package is a C++ extension that requires a build environment to be installed on your system. You must be able to build Node.js itself in order to compile and install the `kerberos` module. Furthermore, the `kerberos` module requires the MIT Kerberos package to correctly compile on UNIX operating systems. Consult your UNIX operation system package manager for what libraries to install.
4+
5+
**Windows already contains the SSPI API used for Kerberos authentication. However, you will need to install a full compiler tool chain using Visual Studio C++ to correctly install the Kerberos extension.**
6+
7+
## Diagnosing on UNIX
8+
9+
If you don’t have the build-essentials, this module won’t build. In the case of Linux, you will need gcc, g++, Node.js with all the headers and Python. The easiest way to figure out what’s missing is by trying to build the Kerberos project. You can do this by performing the following steps.
10+
11+
```bash
12+
git clone https://github.com/mongodb-js/kerberos
13+
cd kerberos
14+
npm install
15+
```
16+
17+
If all the steps complete, you have the right toolchain installed. If you get the error "node-gyp not found," you need to install `node-gyp` globally:
18+
19+
```bash
20+
npm install -g node-gyp
21+
```
22+
23+
If it correctly compiles and runs the tests you are golden. We can now try to install the `mongod` driver by performing the following command.
24+
25+
```bash
26+
cd yourproject
27+
npm install mongodb --save
28+
```
29+
30+
If it still fails the next step is to examine the npm log. Rerun the command but in this case in verbose mode.
31+
32+
```bash
33+
npm --loglevel verbose install mongodb
34+
```
35+
36+
This will print out all the steps npm is performing while trying to install the module.
37+
38+
## Diagnosing on Windows
39+
40+
A compiler tool chain known to work for compiling `kerberos` on Windows is the following.
41+
42+
- Visual Studio C++ 2010 (do not use higher versions)
43+
- Windows 7 64bit SDK
44+
- Python 2.7 or higher
45+
46+
Open the Visual Studio command prompt. Ensure `node.exe` is in your path and install `node-gyp`.
47+
48+
```bash
49+
npm install -g node-gyp
50+
```
51+
52+
Next, you will have to build the project manually to test it. Clone the repo, install dependencies and rebuild:
53+
54+
```bash
55+
git clone https://github.com/christkv/kerberos.git
56+
cd kerberos
57+
npm install
58+
node-gyp rebuild
59+
```
60+
61+
This should rebuild the driver successfully if you have everything set up correctly.
62+
63+
## Other possible issues
64+
65+
Your Python installation might be hosed making gyp break. Test your deployment environment first by trying to build Node.js itself on the server in question, as this should unearth any issues with broken packages (and there are a lot of broken packages out there).
66+
67+
Another tip is to ensure your user has write permission to wherever the Node.js modules are being installed.

0 commit comments

Comments
 (0)