Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ npm install mfilesapi

**Uses on M-Files API. Only compatible with Windows**

Install failed ? Check the troubleshooting section below.

## Usage

```
Expand All @@ -31,3 +33,27 @@ require( 'mfilesapi' ).load( function( err, mfilesapi ) {
- Replace the async registry lookup with synchronous code. This would
allow normal require().

## Troubleshooting

Errors may occur when installing this package, due to the fact that it requires to compile C++ for Node on Windows.

These commands have to be executed in an administrator PowerShell.

### Can't find Python executable "python"

```
npm install -g --production windows-build-tools
```

### Failed to locate "CL.exe"

- Install Visual Studio Community (any version)
- Create a new C++ project and install the required dependency, it includes `CL.exe`

Do not forget to set your VS version as a Node variable :

```
npm config set msvs_version 2015
```

Full list of VS versions available [here](https://github.com/nodejs/node/blob/master/tools/gyp/pylib/gyp/MSVSVersion.py#L229)