banacorn / language-agda

Agda language support for the Atom editor
https://atom.io/packages/language-agda
MIT License
13 stars 5 forks source link

tree-sitter-agda: "prebuild-install || node-gyp rebuild" fails (1.0.5 on windows 10) #15

Closed rjstone closed 5 years ago

rjstone commented 5 years ago

I have no idea what's wrong here.... Ideas? seems to be something wrong with a vcxproj file which I'm assuming is generated by node-gyp

> tree-sitter-agda@1.0.12 install C:\Users\Robert\AppData\Local\Temp\apm-install-dir-118731-201180-r439gu.m7crn0o1or\node_modules\language-agda\node_modules\tree-sitter-agda
> prebuild-install || node-gyp rebuild

C:\Users\Robert\AppData\Local\Temp\apm-install-dir-118731-201180-r439gu.m7crn0o1or\node_modules\language-agda\node_modules\tree-sitter-agda>if not defined npm_config_node_gyp (node "C:\Users\Robert\AppData\Local\atom\app-1.30.0\resources\app\apm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Robert\AppData\Local\atom\app-1.30.0\resources\app\apm\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.
C:\Users\Robert\AppData\Local\Temp\apm-install-dir-118731-201180-r439gu.m7crn0o1or\node_modules\language-agda\node_modules\tree-sitter-agda\build\tree_sitter_agda_binding.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

prebuild-install WARN install No prebuilt binaries found (target=2.0.5 runtime=electron arch=x64 platform=win32)
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\Robert\AppData\Local\atom\app-1.30.0\resources\app\apm\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:215:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\Robert\\AppData\\Local\\atom\\app-1.30.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Robert\\AppData\\Local\\atom\\app-1.30.0\\resources\\app\\apm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Robert\AppData\Local\Temp\apm-install-dir-118731-201180-r439gu.m7crn0o1or\node_modules\language-agda\node_modules\tree-sitter-agda
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Robert\AppData\Local\Temp\apm-install-dir-118731-201180-r439gu.m7crn0o1or\package.json'
npm WARN apm-install-dir-118731-201180-r439gu.m7crn0o1or No description
npm WARN apm-install-dir-118731-201180-r439gu.m7crn0o1or No repository field.
npm WARN apm-install-dir-118731-201180-r439gu.m7crn0o1or No README data
npm WARN apm-install-dir-118731-201180-r439gu.m7crn0o1or No license field.
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Users\\Robert\\AppData\\Local\\atom\\app-1.30.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Robert\\AppData\\Local\\atom\\app-1.30.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\Robert\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Robert\\.atom\\.apmrc" "install" "C:\\Users\\Robert\\AppData\\Local\\Temp\\d-118731-201180-8xltak.wztanstt9\\package.tgz" "--runtime=electron" "--target=2.0.5" "--arch=x64" "--global-style" "--msvs_version=2015"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! tree-sitter-agda@1.0.12 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the tree-sitter-agda@1.0.12 install script 'prebuild-install || 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 tree-sitter-agda package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     prebuild-install || node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tree-sitter-agda
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tree-sitter-agda
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Robert\AppData\Local\Temp\apm-install-dir-118731-201180-r439gu.m7crn0o1or\npm-debug.log
banacorn commented 5 years ago

This looks nasty! I'll see what I can do after I got my hands on a Windows machine.

rjstone commented 5 years ago

If it helps any, you can use virtualbox and download Windows 10 for free. It's just that you won't have a license key so it won't let you change the desktop wallpaper and some stuff like that, but you can use Win 10 in a VM for free.

This is what I do when I need a "clean" windows environment for tracking down bugs.

You may need a windows machine to get the iso though https://www.microsoft.com/en-us/software-download/windows10

MatthijsBlom commented 5 years ago

I think I had the same problem. I fixed it by running (as Administrator)

> npm install --global --production windows-build-tools

Inspiration source: this answer on StackOverflow

I suspect this fixes #12 as well, but I have not tested this.

rjstone commented 5 years ago

Tried that npm install and that might have fixed it.

banacorn commented 5 years ago

I think I should put this in the front page README

banacorn commented 5 years ago

I've managed to pre-build the binaries for Windows on the CI services.

I'm closing this issue, please reopen it if there's any problem after installing the latest version (v1.0.8)