Moodle Mobile Build is failing with Error

Moodle Mobile Build is failing with Error

by Arabinda P -
Number of replies: 1

Hi,

While following steps to build Mobile locally, I get the below Errors

https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2

I am using WIndows 7

I have got - nvm, npm, node, git all installed.

Please help with Error below, Thank you!

----------------------------------------

D:\momobile\moodlemobile2>npm install

> heapdump@0.3.9 install D:\momobile\moodlemobile2\node_modules\heapdump

> node-gyp rebuild

D:\momobile\moodlemobile2\node_modules\heapdump>if not defined npm_config_node_g

yp (node "C:\Users\asahoo\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\

\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )

Building the projects in this solution one at a time. To enable parallel build,

please add the "/m" switch.

MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe".

 If the component is not installed, either 1) install the Microsoft Windows SDK

 for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual

 Studio 2008.  [D:\momobile\moodlemobile2\node_modules\heapdump\build\binding.s

ln]

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\asahoo\AppData\Roaming\npm\n

ode_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_proces

s.js:215:12)

gyp ERR! System Windows_NT 6.1.7601

gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\asahoo\\AppDa

ta\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "

rebuild"

gyp ERR! cwd D:\momobile\moodlemobile2\node_modules\heapdump

gyp ERR! node -v v6.9.5

gyp ERR! node-gyp -v v3.5.0

gyp ERR! not ok

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.x (node_modules\appiu

m\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@

1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}

)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch

okidar\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@

1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}

)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 (node_modules\hea

pdump):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 install: `node-gy

p rebuild`

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

--------------------------------


Regards

Arabinda

Average of ratings: -
In reply to Arabinda P

Re: Moodle Mobile Build is failing with Error

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Arabinda,

we usually develop in Unix environments, so I'm not sure if I'll be able to help you. Other people in the community were able to develop in Windows environment though.

This is the error message displayed:

MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe".

 If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual  Studio 2008. 

Have you tried installing the Windows SDK and Visual Studio? Recently I've been working in a Windows 10 environment to create desktop apps and I was able to install everything fine having the Windows 10 SDK and Visual Studio 2015.

Cheers,

Dani