danielgtaylor / aglio

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

aglio on Windows #282

Open lduparc opened 8 years ago

lduparc commented 8 years ago

Hi,

When are we able to install aglio on Windows.

We have the same issue for few months, have you plan to fix it or not ?

kylef commented 8 years ago

@lduparc Could you elaborate on the issue you're having? Are you seeing any kind of errors?

lduparc commented 8 years ago

@kylef

The issue refer to the protagonist dependency. See the full stractrace below :

$ npm install -g aglio
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
C:\Users\l.duparc\AppData\Roaming\npm\aglio -> C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\bin\aglio.js

> protagonist@1.4.1 install C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist
> node-gyp rebuild

C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist>if not defined npm_config_node_gyp (node "C:\Users\l.duparc\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Warning: Missing input files:
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-SerializeResultTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-RefractParseResultTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-ExtendElementTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-RenderTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-CAPI.c
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-RefractAPITest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-drafter.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-RefractDataStructureTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-OneOfTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-SchemaTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-RefractSourceMapTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-ElementFactoryTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-CircularReferenceTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-ApplyVisitorTest.cc
C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\..\..\drafter\test\test-SerializeSourceMapTest.cc
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
VCBUILD : error : project file 'C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\libdrafter.vcproj' was not found or not a valid project file. [C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\binding.sln]
VCBUILD : error : project file 'C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\ext\snowcrash\libmarkdownparser.vcproj' was not found or not a valid project file. [C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\binding.sln]
VCBUILD : error : project file 'C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\ext\snowcrash\libsnowcrash.vcproj' was not found or not a valid project file. [C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\binding.sln]
VCBUILD : error : project file 'C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\libsos.vcproj' was not found or not a valid project file. [C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\binding.sln]
VCBUILD : error : project file 'C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\drafter\ext\snowcrash\libsundown.vcproj' was not found or not a valid project file. [C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\l.duparc\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\l.duparc\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\l.duparc\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
C:\Users\l.duparc\AppData\Roaming\npm
`-- (empty)

npm WARN optional Skipping failed optional dependency /aglio/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\l.duparc\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "aglio"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! protagonist@1.4.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@1.4.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR!     npm bugs protagonist
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls protagonist
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     Z:\Downloads\aglio-2.2.1\npm-debug.log
npm ERR! code 1
lduparc commented 8 years ago

@kylef

I'm using nvm in order to use different node version.

$ nvm list

    6.3.1
  * 0.12.15 (Currently using 64-bit executable)
    0.12.0
    0.10.33
kylef commented 8 years ago

This should work with later versions of Node (Node 6 etc). Could you confirm you have some of the build dependencies for Protagonist:

There have been reports of similar in https://github.com/nodejs/node-gyp/issues/629 where people have solved the build problems by explicitly setting the MSVS version with NPM. For example, if you have MSVS2015 you could try the following:

$ set GYP_MSVS_VERSION=2015
$ npm install -g aglio

277 should make it easier to install Aglio on windows due to making Protagonist an optional dependency.

lduparc commented 8 years ago

My current python version is : 2.7.12 and GYP_MSVS_VERSION is already set.

I'm using Visual Studio Express 2012.

When will be available the new aglio version making Protagonist optional with drafter ?

lduparc commented 8 years ago

It's working on my device. Thanks for your help. I'm trying to install aglio on another computer in order to validate the workflow.

kylef commented 8 years ago

@lduparc Microsoft Visual Studio 2012 is not supported in Protagonist (Protagonist Deprecation). You will need to upgrade to Microsoft Visual C++ 2013 or later.

https://github.com/danielgtaylor/aglio/pull/277 would ultimately remove the need for Microsoft Visual Studio/C++ since it will become an optional dependency. This may also be an option for you.

lduparc commented 8 years ago

@kylef

I'm currently testing using Visual Studio Express 2013. When will be available the new version with Protagonist as an optional dependency ?

Thanks.

lduparc commented 8 years ago

OK everything works fine using :

After install Visual Studio we have to launch a first time VS in order to setup it.

Then run on CMD :

Then run aglio -i your.apib -o your.html for example.

Thanks for your help @kylef

george-haddad commented 8 years ago

Hey, I'm following this message and I'm getting errors trying to install aglio. I have python and MSVS 2015 and Node v6.3.1 and I get build errors. It's really a bit surprising to see so many dependencies for aglio. My error dump is below, I'm not a big node expert so not sure what to tackle first.

gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\georges.haddad\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\georges.haddad\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\georges.haddad\AppData\Roaming\npm\node_modules\aglio\node_modules\protagonist
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
C:\Users\georges.haddad\AppData\Roaming\npm
`-- (empty)

npm WARN optional Skipping failed optional dependency /aglio/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\georges.haddad\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "aglio@beta"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE

npm ERR! protagonist@0.20.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@0.20.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR!     npm bugs protagonist
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls protagonist
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\georges\git\platform\npm-debug.log
npm ERR! code 1
fehro commented 8 years ago

I had the same issue as you. This fixed it. https://stackoverflow.com/a/38149604