From d8d0c014b83890f0c51dd56159523ba319533992 Mon Sep 17 00:00:00 2001 From: Simon Tarchichi Date: Wed, 15 Mar 2017 15:24:21 +0100 Subject: [PATCH] README : troubleshooting --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 712205d..301b766 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ npm install mfilesapi **Uses on M-Files API. Only compatible with Windows** +Install failed ? Check the troubleshooting section below. + ## Usage ``` @@ -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)