gatsby-packages
gatsby-packages copied to clipboard
Cannot read property 'apiKey' of undefined
Hello, I was just trying to setup this plugin for my project, but, can't get past the gatsby-config.js
phase.
I've added the plugin in my gatsby-config.js
like this:
module.exports =
{
plugins: [
{
resolve: `gatsby-plugin-firebase`,
options:
{
credentials:
{
apiKey: `value`,
authDomain: `value`,
databaseURL: `value`,
projectId: `value`,
storageBucket: `value`,
messagingSenderId: `value`,
appId: `value`
}
}
},
}
with the respective values from the config Firebase gave my app. However, when I run gatsby develop
in console, I get:
"gatsby-plugin-firebase" threw an error while running the onCreateWebpackConfig lifecycle:
Cannot read property 'apiKey' of undefined
2 | const {
3 | credentials: {
> 4 | apiKey,
| ^
5 | authDomain,
6 | databaseURL,
7 | projectId,
File: node_modules\gatsby-plugin-firebase\gatsby-node.js:4:7
This seemed to me like the easiest step, but, has kept me puzzled already. I'm using "gatsby-plugin-firebase": "^0.2.0-beta.4"
, by the way.
Same issue ...