apex-tmLanguage icon indicating copy to clipboard operation
apex-tmLanguage copied to clipboard

Can't run `npm install` on Windows - complains about missing python even though python is available

Open vazexqi opened this issue 7 years ago • 3 comments

Details

What editor are you seeing the problem in? (e.g. Atom, Visual Studio Code, etc.) N/A

What version of the editor are you using? N/A

What color theme are you using? N/A

Repro

  1. Git clone this repository
  2. Ensure that you have python installed. I used choco install python.
  3. Run npm install

See the attached error in Powershell. I'm not sure if this is an optional dependency but this might prevent proper development on Windows.

Please provide a code example and (optionally) a screenshot demonstrating the problem.

sketch

vazexqi avatar Jun 14 '18 05:06 vazexqi

It seems that because oniguruma has a dependency on node-gyp, we need to follow the steps at https://github.com/nodejs/node-gyp#on-windows very carefully.

  1. choco install python2 since python3 doesn't work. So you might just want to uninstall that if you already have it.
  2. npm install --global --production windows-build-tool

I think python and the Windows build tools are required for this to work, unfortunately. Even VS Code (the code for the editor itself) requires python and the C++ build tools. See https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites

vazexqi avatar Jun 14 '18 06:06 vazexqi

I think this might actually affect all three platforms: Linux, Mac, and Windows.

We don't see this on the autobuilds because the autobuilds probably have all the software installed. We don't see this on our Mac laptops probably because we already have XCode and Python installed as part the setup on our machines. We don't see this on Windows because most of us don't use Windows officially.

There might be a bit more that we can document on the README.md on how to get started. But, for now, we can just leave this here so that others can search for it.

vazexqi avatar Jun 14 '18 06:06 vazexqi

CC: @lcampos

vazexqi avatar Jun 14 '18 06:06 vazexqi