How should I use Google Drive REST v3 API with electron?


#1

I’m fairly new to electron and node.js, but I’m extremely interested in it. I’m testing myself with a program and I wanted to use the google api, but npm is erroring with ❯ n i googleapis --save && n i google-auth-library --save
npm WARN package.json Desque@0.0.0-a No README data

> electron-prebuilt@1.2.5 postinstall /home/joseph2/Development/Desque/node_modules/electron-prebuilt
> node install.js

npm WARN package.json Desque@0.0.0-a No README data

> electron-prebuilt@1.2.5 postinstall /home/joseph2/Development/Desque/node_modules/electron-prebuilt
> node install.js

. I suppose it isn’t an error, just not installing. What am I doing wrong?


#2

Is it definitely not installing? Because it’s just an npm warning, it should have still finished the install.


#3

It might be definitely not installing. Isn’t it supposed to end up under
node_modules in my app directory? Am I having a moment over here?


#4

I’m finding your first post a tad confusing, what are you running and what is it returning?

Is Desque the project you’re working on? In which case that warning’s just that you’ve got no README, but I don’t really know why you’d be calling electronprebuilt@1.2.5 or node install.js. I’m also not so sure about this n i, I realise i is short for install, but are you sure the n you’re using is equivalent to npm? I’ve got a npm module for Node version management called n, but it may be a red herring.

You’ve added it to your project (supposedly), so it should be listed in your package.json, and should just be available to be called in whatever gets run when you point electron at your app.


#5

First off, thank you for helping me, second I’ll reiterate cause I forget sometimes that every shell is different XD

I’m working on a project called Desque, yes. n i is my ZSH shortcut for npm install. I’ve fixed the readme warn (By making a readme) and running the command n i googleapis --save outputs

> electron-prebuilt@1.2.5 postinstall /home/joseph2/Development/Desque/node_modules/electron-prebuilt
> node install.js

and does nothing else. No change in any file, no scripts, no modules, no where in my project or on my machine.

Also, I’m running Linuix Mint 17.7 with Node-legacy and electron-prebuilt 1.0. Oh-my-zsh (v?) for a shell.


#6

Huh, weird. It installs without an issue for me, the reporting back, I assume, is electron-prebuilt running (or attempting to run) a script after install. To me, it looks like npm is failing to even remotely install googleapis somehow, because you’re not getting any feedback from it, then for whatever strange reason it’s attempting to run the postinstall script of electron-prebuilt.

Definitely sounds like an npm issue though, sounds mental