aglio icon indicating copy to clipboard operation
aglio copied to clipboard

aglio on Windows

Open lduparc opened this issue 8 years ago • 11 comments

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 ?

lduparc avatar Jul 26 '16 15:07 lduparc

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

kylef avatar Jul 26 '16 15:07 kylef

@kylef

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

$ npm install -g aglio
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Deprecated, use jstransformer
npm WARN deprecated [email protected]: 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

> [email protected] 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: [email protected]
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! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 avatar Jul 26 '16 15:07 lduparc

@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

lduparc avatar Jul 26 '16 15:07 lduparc

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

  • Python ~> 2.7
  • Microsoft Visual Studio

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.

kylef avatar Jul 26 '16 15:07 kylef

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 avatar Jul 26 '16 15:07 lduparc

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.

lduparc avatar Jul 26 '16 16:07 lduparc

@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.

kylef avatar Jul 26 '16 16:07 kylef

@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 avatar Jul 27 '16 06:07 lduparc

OK everything works fine using :

  • Visual Studio Express 2013 on Windows 7
  • Visual Studio Express 2015 on Windows 10
  • Python 2.7.X
  • NVM with node version 0.12.15

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

Then run on CMD :

  • nvm install 0.12.15
  • nvm use 0.12.15
  • set GYP_MSVS_VERSION=2013 or set GYP_MSVS_VERSION=2015
  • npm install -g node-gyp
  • npm install -g aglio@beta (NOT WORKING with npm install -g aglio)

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

Thanks for your help @kylef

lduparc avatar Jul 27 '16 08:07 lduparc

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: [email protected]
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! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

george-haddad avatar Sep 05 '16 14:09 george-haddad

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

fehro avatar Sep 29 '16 05:09 fehro