node-packer icon indicating copy to clipboard operation
node-packer copied to clipboard

Failed running ["call vcbuild.bat x64"]

Open Kenneth111 opened this issue 7 years ago • 12 comments

Hi, When compiling my codes, I get an error as follows: -> Running ["call vcbuild.bat x64"] 'vcbuild.bat' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 Failed running ["call vcbuild.bat x64"] I looks like this error is related with Visual Studio. Well, I do have vs2015 update 3, but don't install vs2017. Should I install vs2017 to fix this problem? Any ideas? Many thanks.

Kenneth111 avatar Jun 06 '17 09:06 Kenneth111

@Kenneth111 No you do not have to install vs 2017. VS 2015 still works.

vcbuild.bat should be part of the compiler, not from the environement. Could you try run it with the option --clean-tmpdir? I am guessing that the tmpdir contains some incomplete source code.

pmq20 avatar Jun 07 '17 03:06 pmq20

@Kenneth111 @pmq20 I had the same error and the only way to make it work for me was to download node-compiler from github (I guess downloading Node.js from github should also work) and adding the folder with vcbuild.bat to the PATH env variable.

And-re avatar Jun 07 '17 06:06 And-re

I installed all the dependencies listed in the readme, but had the same error. Solved it by installing: https://github.com/felixrieseberg/windows-build-tools

mudcrab avatar Jun 07 '17 06:06 mudcrab

I have solved this problem using nodec v0.9.6, nodejs v7.10.0 and running nodec with the option --clean-tmpdir as @pmq20 suggested. However, the same error still appears if I use nodec v1.0 and nodejs 8,0.

Kenneth111 avatar Jun 14 '17 01:06 Kenneth111

@Kenneth111 What if you use nodec v1.0 and nodejs 8,0 and again with option --clean-tmpdir?

pmq20 avatar Jun 14 '17 02:06 pmq20

@pmq20 I have tried. It doesn't work.

Kenneth111 avatar Jun 15 '17 01:06 Kenneth111

@Kenneth111 Could you give me the full log to inspect the problem?

pmq20 avatar Jun 15 '17 03:06 pmq20

I am getting this error as well. I am using Node v8.1.1 and Nodec 1.1.0. I have installed windows-build-tools as @mudcrab pointed out and restarted the box I was using but still ended up with Failed running ["call vcbuild.bat x64"]. I am about to try @And-re pointed out next I guess.

firrae avatar Jun 26 '17 14:06 firrae

UPDATE: After noticing I had a weird Python error in the log as well I realised that windows-build-tools don't automatically put Python in the env so once I flagged that and reinstalled, it seems to be working now. We'll see once the build is done!

firrae avatar Jun 26 '17 14:06 firrae

Hm, I am getting this again now, even with the --clean-tmpdir flag. I had thought it was due to my memory but after increasing it on my Windows build server to 16GB it's still throwing this without and noticeable error.

Any idea on how to fix this?

To note, I do not have full VS installed, I only used the npm package windows-build-tools.

firrae avatar Jul 13 '17 14:07 firrae

After adding RAM it seems to have solved the problem. I needed 16GB of actual RAM and 8GB of virtual memory to build my project, it also took about 30 minutes, but it all works! 😄

firrae avatar Jul 14 '17 15:07 firrae

@firrae Congratulations

pmq20 avatar Jul 15 '17 08:07 pmq20