franklintarter / gatsby-source-google-places Goto Github PK
View Code? Open in Web Editor NEWGatsby source plugin for the Google places API
Gatsby source plugin for the Google places API
Hey @franklintarter sorry I know I said I got this working but it looks like it only worked with gatsby develop
. I've since tried to deploy to netlify (also using clear cache and deploy site) and I'm still getting the same error. This is also true when I run gatsby build
locally.
### package.json
{
"name": "gatsby-starter-default",
"private": true,
"description": "A simple starter to get up and developing quickly with Gatsby",
"version": "0.1.0",
"author": "Kyle Mathews <[email protected]>",
"dependencies": {
"@emotion/core": "^10.0.27",
"@emotion/styled": "^10.0.27",
"eslint-plugin-emotion": "^10.0.27",
"eslint-plugin-react-redux": "^3.0.3",
"gatsby": "^2.19.1",
"gatsby-image": "^2.2.39",
"gatsby-plugin-emotion": "^4.1.21",
"gatsby-plugin-manifest": "^2.2.37",
"gatsby-plugin-offline": "^3.0.32",
"gatsby-plugin-react-helmet": "^3.1.21",
"gatsby-plugin-react-redux": "^1.1.0-0",
"gatsby-plugin-sharp": "^2.4.0",
"gatsby-source-filesystem": "^2.1.46",
"gatsby-source-google-places": "^0.0.5",
"gatsby-transformer-sharp": "^2.3.13",
"is-url-external": "^1.0.3",
"normalize.css": "^8.0.1",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-helmet": "^5.2.1",
"react-id-swiper": "^3.0.0",
"react-inlinesvg": "^1.2.0",
"react-instafeed": "^1.0.0",
"react-redux": "^7.1.3",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"swiper": "^5.3.6",
"typeface-orbitron": "^1.1.3",
"use-abortable-fetch": "^2.6.11",
"use-ssr": "^1.0.22",
"uuid": "^7.0.3"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.18.0",
"eslint-plugin-react-hooks": "^3.0.0",
"prettier": "^2.0.2"
},
"keywords": [
"gatsby"
],
"license": "MIT",
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
},
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
}
}
### gatsby-config.js
const menus = require("./gatsby/menus");
module.exports = {
siteMetadata: {
title: "Gatsby Default Starter",
description: "Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.",
author: "@gatsbyjs",
menus,
},
plugins: [
"gatsby-plugin-react-helmet",
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: "${__dirname}/src/images",
},
},
"gatsby-transformer-sharp",
"gatsby-plugin-sharp",
{
resolve: "gatsby-plugin-manifest",
options: {
name: "gatsby-starter-default",
short_name: "starter",
start_url: "/",
background_color: "#663399",
theme_color: "#663399",
display: "minimal-ui",
icon: "src/images/gatsby-icon.png",
},
},
{
resolve: "gatsby-plugin-react-redux",
options: {
pathToCreateStoreModule: "./src/state/createStore",
serialize: {
space: 0,
isJSON: true,
unsafe: false,
},
cleanupOnClient: true,
windowKey: "__PRELOADED_STATE__",
},
},
{
resolve: "gatsby-plugin-emotion",
options: {},
},
{
resolve: "gatsby-source-google-places",
options: {
placeIds: [
"ChIJ8-0CIs4adkgRFAs5L2t2Q0k",
"ChIJdda2YaENdkgRCwEXWRSTFyw",
],
apiKey: "...",
},
},
],
};
Hey great job , but how to change the return language ?
I've been loving the plugin but I've recently moved to Gatsby v4 and it seems I have no options to continue using it. Can you give any guidance?
Hey,
I think in the readme in the section "using" - "Setup the plugin" it should be
placeId: '<your_place_id>',
instead of
spaceId: '<your_space_id>',
Hi, Is it possible to fetch more than 1 place? I have 2 places that I'd like to get info for. I've tried putting the places ID's in an array in the config but it seems to only return the first one.
Hi there!
I tried to install the package with a totally new gatsby project and got the following errors:
After installing, I tried to query and most of the nodes were not even found.
I could query place ID, formated_address, but couldn't not find rating, nor anything related to reviews.
Any help would be much appreciate.
The plugin seems to still work perfectly on new installs of Gatsby but the Peer Dependencies and Engines still use old versions of Node and Gatsby...
"peerDependencies": {
"gatsby": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
}
are there any plans to push any releases to update these?
I'm happy to look into creating a Pull Request for the work but, I'm a relatively junior developer.
I've been using this plugin for a while (thank you)
I've just been alerted to a security issue for this plugin and noticed it's in a PR already from Dependabot.
If you still support this plugin would you mind merging this security fix? or advise if you no longer actively support the plugin.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.