Firebase functions in local

0

I would like to do my firebase tests locally. The hosting works properly but the functions do not.
I'm following google steps

This is the error he gives me: '

   C:\..\functions\server_part> firebase serve --only functions,hosting

=== Serving from 'C:\..\functions\server_part'...

!  functions: Cannot start emulator. Error: Cannot find module 'grpc'
i  hosting: Serving hosting files from: public
+  hosting: Local server: http://localhost:5000

When trying to install grpc

I get a few mistakes, but I think the most important one is:

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\txema\Documents\broccoli-music\node_modules\@google-cloud\functions-emulator\node_modules\grpc\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\txema\Documents\broccoli-music\node_modules\@google-cloud\functions-emulator\node_modules\grpc\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\txema\Document\broccoli-music\node_modules\@google-cloud\functions-emulator\node_modules\grpc\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\txema\Documents\broccoli-music\node_modules\@google-cloud\functions-emulator\node_modules\grpc\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\txema\Documents\broccoli-music\node_modules\@google-cloud\functions-emulator\node_modules\grpc\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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299

I have installed the visual Studio and the net framework 4.7

Thank you very much for the attention

    
asked by Txmx 04.02.2018 в 21:04
source

1 answer

1

You should check if you have version 2.0 of the .NET Framework installed, as the error tells you. To check it, look here in regedit:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP

Having installed version 4.7 does not mean that you have the 2.0, you also need the 2.0 part.

    
answered by 13.08.2018 / 17:21
source