Skip to content

Commit 10d6ccb

Browse files
authored
fix the installing guide for Windows (WiseLibs#440)
The old guide do not work anymore, update the guide to latest toolchain.
1 parent 7e36714 commit 10d6ccb

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

docs/troubleshooting.md

+8-16
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,13 @@ If you have trouble installing `better-sqlite3`, follow this checklist:
1111
4. If you're using Windows, follow these steps. Do them **in this order**, and **don't skip steps**.
1212

1313
1. Install the **latest** of node 10 or node 12.
14-
2. Start an Admin PowerShell: Right-click the start icon, then pick `Windows PowerShell (Admin)`
15-
3. Install *both* vs2015 and vs2017 libraries. Each line will take ~5-10 minutes.
16-
```sh
17-
npm install --global --production --vs2015 --add-python-to-path windows-build-tools
18-
npm install --global --production --add-python-to-path windows-build-tools node-gyp
19-
```
20-
4. In your project, make sure you're not fighting with old build configurations. Delete **both**
21-
* your `%USERPROFILE%/.node-gyp` and
22-
* your project's `node_modules` directories.
23-
5. Set up `%USERPROFILE%/.npmrc` correctly:
24-
```sh
25-
msvs_version=2015
26-
python=python2.7
27-
```
28-
(where `%USERPROFILE%` is your home directory).
29-
6. Run `npm install`
14+
2. Install **latest** Visual Studio Community and Desktop Development with C++ extension.
15+
3. Install **latest** Python.
16+
4. Run following commands:
17+
```
18+
npm config set msvs_version 2019
19+
npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
20+
```
21+
5. Run `npm install`
3022
3123
If none of these solved your problem, try browsing [previous issues](https://github.com/JoshuaWise/better-sqlite3/issues?q=is%3Aissue) or open a [new issue](https://github.com/JoshuaWise/better-sqlite3/issues/new).

0 commit comments

Comments
 (0)