GCP datastore tutorial 'google-cloud' npm error


I am trying to get the ‘google-cloud-datastore-tutorial’ working, but get stuck when I run the command ‘npm install’. I get the error as seen in the screenshots below. I’m at a loss of what else to try, any thoughts on why this isn’t working?

The error is Could not load the Visual C++ component “VCBuild.exe”. To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Windows Visual Studio 2005 or 3) add the location of the component to the system path of it’s installed elsewhere.

I’d guess you probably need to do step 1 or step 2 (either one). And you can install a newer version than 2005.


Running “npm install --global --production windows-build-tools” as administrator solved the issue. I am having a new error now. When I run “node tutorial.js”.

    throw err;

Error: Cannot find module '[...]node_modules\@google-cloud\compute\node_modules\grpc\src\node\extension_binary\grpc_node.node'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> ([...]\@google-cloud\compute\node_modules\grpc\src\node\src\grpc_extension.js:38:15)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)

Any thoughts?

Sorry, I haven’t seen that error before. Aside from looking like a module is missing, I’m not sure why or how to fix it.