Sunday, 4 June 2017

node-google-image-search error message 'Invalid Value'

I am making a node app which can return google images, I'm using the "node-google-image-search' app to help me do this. I created a .env file named "env.env" and imported the app with

const imageSearch = require('node-google-image-search'); const dotenv = require('dotenv').config({path: './env.env'});

Then I tried to search something with the following code.

var results = imageSearch('google', callback, 0, 5);

function callback(results) {
    console.log(results);
}

This caused me to get the following error in the console:

[ { domain: 'global', reason: 'invalid', message: 'Invalid Value' } ]



via McMatt

No comments:

Post a Comment