jbolda / gatsby-source-airtable

MIT License
216 stars 43 forks source link

Gatsby v3 DeprecationWarning #285

Closed nmastroianni closed 3 years ago

nmastroianni commented 3 years ago

Good day all. I am new to all this, but when I recently began moving my site from Gatsby v2 -> v3, I now get a deprecation warning.

I am not sure if this is something that others are experiencing or if its an issue caused by the change from v2 to v3. Hoping I'm not the only one and that this will help get the issue resolved.

Environment details: Node v14.15.4 packages:

"dependencies": {
    "gatsby": "^3.0.3",
    "react": "^17.0.1",
    "react-dom": "^17.0.1"
  },
  "devDependencies": {
    "autoprefixer": "^10.2.5",
    "gatsby-plugin-image": "^1.0.0",
    "gatsby-plugin-postcss": "^4.0.0",
    "gatsby-plugin-sharp": "^3.0.0",
    "gatsby-source-airtable": "^2.1.1",
    "gatsby-source-filesystem": "^3.0.0",
    "gatsby-transformer-sharp": "^3.0.0",
    "postcss": "^8.2.7",
    "prettier": "2.2.1",
    "tailwindcss": "^2.0.3"
  },

I hope this was not the "wrong" way to go about looking for help. I apologize if this was not the proper etiquette for this.

Output below:

When running a --trace-deprecation I receive the following output:

[DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
    at module.exports (C:\Users\nf_ma\development\gatsby\rooted-gatsby\node_modules\timed-out\index.js:9:17)    
    at EventEmitter.<anonymous>
(C:\Users\nf_ma\development\gatsby\rooted-gatsby\node_modules\got\index.js:244:5)
    at Object.onceWrapper (events.js:422:26)
    at EventEmitter.emit (events.js:315:20)
    at makeRequest
(C:\Users\nf_ma\development\gatsby\rooted-gatsby\node_modules\cacheable-request\src\index.js:94:9)
    at C:\Users\nf_ma\development\gatsby\rooted-gatsby\node_modules\cacheable-request\src\index.js:104:14       
    at runNextTicks (internal/process/task_queues.js:58:5)
    at processImmediate (internal/timers.js:434:9)

My gatsby-config.js looks like this:

require("dotenv").config({
  path: `.env.${process.env.NODE_ENV}`,
})
module.exports = {
  /* Your site config here */
  plugins: [
    "gatsby-plugin-postcss",
    "gatsby-plugin-image",
    "gatsby-plugin-sharp",
    "gatsby-transformer-sharp",
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },
    {
      resolve: "gatsby-source-airtable",
      options: {
        apiKey: process.env.AIRTABLE_API_KEY,
        tables: [
          {
            baseId: process.env.AIRTABLE_STAFF_BASE_ID,
            tableName: "clinicians",
            tableView: "allClinicians",
            mapping: {
              photo: `fileNode`,
            },
          },
        ],
      },
    },
  ],
}
github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any recent activity for 30 days. It will be closed if no further activity occurs within 7 days. Remove stale label, comment, and/or apply "ongoing issue" label to prevent this from being closed. Thank you for your contributions.

beadlespouse commented 3 years ago

Hey! I'm having this exact same problem. Did you manage to resolve it?

nmastroianni commented 3 years ago

Hey! I'm having this exact same problem. Did you manage to resolve it?

Hi Beadle. Sadly, the way in which I resolved it was to start a new project and then rebuild the site component by component so that I didn't have the warning. Luckily it was a small site. I ended up ditching airtable as well as it proved to be less user friendly than contentful.

jbolda commented 3 years ago

As far as I can tell, this warning is something deeper in gatsby and/or transitive dependencies. (Which is why, I suspect, rebuilding from scratch and having a fresh lock file resolves it.)

I ended up ditching airtable as well as it proved to be less user friendly than contentful.

I completely understand this. Airtable will never be able to compete with a full-blown CMS, if you need those features. 👍