danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 481 forks source link

error installing aglio on windows7 #201

Closed ducin closed 8 years ago

ducin commented 8 years ago

Hello All,

Although being a linux fan, my company's requirement is to work under windows. I'm trying to install agliounder windows and I'm failing with it:

$ npm install -g aglio
npm WARN optional dep failed, continuing fsevents@1.0.5

> utf-8-validate@1.2.1 install C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild

C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate\build\binding.sln]
gyp
> utf-8-validate@1.2.1 install C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild

C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate\build\binding.sln]
gypnpm
> bufferutil@1.2.1 install C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild

 WARN optional dep failed, continuing utf-8-validate@1.2.1

C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil\build\binding.sln]
gypnpm
> bufferutil@1.2.1 install C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild

 WARN optional dep failed, continuing utf-8-validate@1.2.1

C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\binding.sln]
gypnpm
> protagonist@1.1.1 install C:\Program Files\nodejs\node_modules\aglio\node_modules\protagonist
> node-gyp rebuild

 WARN optional dep failed, continuing bufferutil@1.2.1
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.35","npm":"2.5.1"})
npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.35","npm":"2.5.1"})
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.35","npm":"2.5.1"})

C:\Program Files\nodejs\node_modules\aglio\node_modules\protagonist>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Warning: Missing input files:
C:\Program Files\nodejs\node_modules\aglio\node_modules\protagonist\build\drafter\ext\snowcrash\..\..\..\..\drafter\ext\snowcrash\src\Version.h
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\protagonist\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\protagonist\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\protagonist\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\protagonist\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Program Files\nodejs\node_modules\aglio\node_modules\protagonist\build\binding.sln]
gypnpm
> aglio-theme-olio@1.6.2 postinstall C:\Program Files\nodejs\node_modules\aglio\node_modules\aglio-theme-olio
> node scripts/setup-cache.js

 WARN optional dep failed, continuing bufferutil@1.2.1
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "aglio"
npm ERR! node v0.10.35
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! protagonist@1.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@1.1.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the protagonist package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls protagonist
npm ERR! There is likely additional logging output above.

I can see that agliois trying to use something like MSBUILD, which - as I found in www - is related to MS Visual Studio. My questions are:

oxhacks commented 8 years ago

@ducin I was able to get past this using VS 2015. I did, however, have to start a new C++ project so that the appropriate tools were installed.

You can see more about this in node-gyp here: https://github.com/nodejs/node-gyp/issues/694

ducin commented 8 years ago

@jaykwon thx for your input. The problem is, however, that I don't have VS and I'm not going to have it. In fact, it's the corporate institution I'm working for - they won't decide to buy MSVS only to get aglio up and running.

As far as I understand, aglio requires some API-blueprint component that needs to be compiled. Maybe there's an alternative compiler for windows that is not VS-dependent? Or maybe it could be just .exe or .msi instaled somehow?

danielgtaylor commented 8 years ago

@ducin really sorry to hear you are having issues. Please have a look at the new experimental pure Javascript version of Drafter:

https://github.com/apiaryio/drafter#drafterjs

That could be used instead of Protagonist in Aglio to parse the blueprints, which in turn means no more C++ to compile. In the future I hope to provide it as a fallback for those environments where compiling is difficult or impossible, but today you'll have to try and use it manually.

swamikevala commented 8 years ago

I'm also having the same problem with Windows installation. Could you provide step by step instructions how we can replace Protagonist with Drafter. Many Thanks!

danielgtaylor commented 8 years ago

@swamikevala I'm working on integrating it into Aglio over the next few weeks, so hopefully this should become a non-issue shortly.

danielgtaylor commented 8 years ago

It turns out this is a bit more complicated than I originally envisioned. The newer Drafter and Drafter.js generate their own JSON schemas that don't support all the features that the internal generator in Aglio does, and there is no way to tell when a schema is user-supplied or generated by Drafter unless I use source maps and Refract output. That requires changing all of Aglio over to the new Refract interface, which I started to do but will take a pretty significant effort. So my choices are to continue on that front, or lose some support for JSON example and schema generation from MSON input. Both are not ideal unfortunately...

pavelkornev commented 8 years ago

I have same issue on OSX 10.11, npm 3.5.2, node 5.3.0

I have reported in patagonist issue tracker, but it seems they have this issue since April 2014 - ALMOST 2 YEARS! Looks that they are not going to fix it or they simply don't know how.

wuotr commented 8 years ago

I have the same issue on OSX 10.11, npm v2.14.9 and node v0.12.9. :-S.

pavelkornev commented 8 years ago

@wuotr they have just released protagonist 1.2.5 which fixed bug on my system and aglio works like a sharm at this moment.

wuotr commented 8 years ago

Indeed... it is fixed on my system as well ;-). /cc @pavelkornev

ducin commented 8 years ago

How about windows users? Did anyone manage to make aglio up and running on any version of windows?

grojguy commented 8 years ago

Still broken for me on two different Windows 7 machines with node v4.4.0, npm 3.8.0, and protagonist 1.2.6

Help! Any ideas on a solution?

grojguy commented 8 years ago

FYI, I found a solution. See HERE.

I'd already done most of the steps, but slightly differently. I installed standard python from python.org, then installed Visual Studio 2015 Community, then added Visual C++ support from within VS2015 via File -> New -> Project, then 2016-03-12 04_28_39-new project

I think the key step is #5 ... "Set the npm config variable msvs_version to 2015: npm config -g set msvs_version 2015"

After this, aglio installed successfully, although I did get one warning as follows...

npm WARN optional Skipping failed optional dependency /aglio/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
reustonium commented 8 years ago

Any hope for removing the protagonist (and thus the node-gyp) dependency? This has been a real deal breaker for us unfortunately.