Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutgoingMessage.prototype._headers is deprecated #29993

Closed
precious-void opened this issue Mar 4, 2021 · 27 comments
Closed

OutgoingMessage.prototype._headers is deprecated #29993

precious-void opened this issue Mar 4, 2021 · 27 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: needs more info Needs triaging and reproducible examples or more information to be resolved type: bug An issue or pull request relating to a bug in Gatsby

Comments

@precious-void
Copy link

precious-void commented Mar 4, 2021

Description

After migration to Gatsby 3, I'm experiencing this deprecation warning, but cannot find, which module is causing it.

verbose Transition to "runningQueries" > "calculatingDirtyQueries"
verbose Transition to "runningQueries" > "runningStaticQueries"
verbose Transition to "runningQueries" > "runningPageQueries"

 ERROR 

(node:28688) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

success run page queries - 0.867s - 2/2 2.31/s
verbose Transition to "runningQueries" > "waitingForJobs"
verbose Transition to "runningQueries" > "done"
verbose Transition to "startingDevServers"

Environment

  System:
    OS: Windows 10 10.0.18363
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 12.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.9.1 - /c/Users/Artem Shteltser/AppData/Local/Programs/Python/Python39/python
  Browsers:
    Edge: Spartan (44.18362.449.0)
  npmPackages:
    gatsby: ^3.0.1 => 3.0.1
    gatsby-plugin-emotion: ^6.0.0 => 6.0.0
    gatsby-plugin-env-variables: ^2.0.0 => 2.0.0
    gatsby-plugin-eslint: ^3.0.0 => 3.0.0
    gatsby-plugin-google-fonts-v2: ^0.0.6 => 0.0.6
    gatsby-plugin-image: ^1.0.0 => 1.0.0
    gatsby-plugin-manifest: ^3.0.0 => 3.0.0
    gatsby-plugin-module-resolver: ^1.0.3 => 1.0.3
    gatsby-plugin-offline: ^4.0.0 => 4.0.0
    gatsby-plugin-portal: ^1.0.7 => 1.0.7
    gatsby-plugin-postcss: ^4.0.0 => 4.0.0
    gatsby-plugin-react-helmet: ^4.0.0 => 4.0.0
    gatsby-plugin-sharp: ^3.0.0 => 3.0.0
    gatsby-plugin-sitemap: ^3.0.0 => 3.0.0
    gatsby-source-filesystem: ^3.0.0 => 3.0.0
    gatsby-source-graphql: ^3.0.0 => 3.0.0
    gatsby-transformer-sharp: ^3.0.0 => 3.0.0
@precious-void precious-void added the type: bug An issue or pull request relating to a bug in Gatsby label Mar 4, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 4, 2021
@precious-void
Copy link
Author

Probably, similar issue as described here #25427 but on v3.

@pieh
Copy link
Contributor

pieh commented Mar 4, 2021

NODE_OPTIONS=--trace-deprecation gatsby develop should print stack trace that should help narrowing it down

@precious-void
Copy link
Author

@pieh here is the full log:

 ERROR 

(node:22460) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
    at module.exports (C:\projects\onlixe\blog-insiders\insiders-template-react\node_modules\timed-out\index.js:9:17)  
    at EventEmitter.<anonymous>
(C:\projects\onlixe\blog-insiders\insiders-template-react\node_modules\got\index.js:244:5)
    at Object.onceWrapper (events.js:300:26)
    at EventEmitter.emit (events.js:210:5)
    at makeRequest
(C:\projects\onlixe\blog-insiders\insiders-template-react\node_modules\cacheable-request\src\index.js:94:9)
    at C:\projects\onlixe\blog-insiders\insiders-template-react\node_modules\cacheable-request\src\index.js:104:14     
    at runNextTicks (internal/process/task_queues.js:58:5)
    at processImmediate (internal/timers.js:412:9)

@creotip
Copy link

creotip commented Mar 5, 2021

Have the same errors after updating to gatsby 3

@wardpeet
Copy link
Contributor

wardpeet commented Mar 5, 2021

@shtelzerartem yarn why timed-out should give you the package that uses timed-out, that's the culprit.

@LekoArts LekoArts added status: needs more info Needs triaging and reproducible examples or more information to be resolved v3migration and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 5, 2021
@itsmeow
Copy link
Contributor

itsmeow commented Mar 6, 2021

yarn why v1.22.4
[1/4] Why do we have the module "timed-out"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "timed-out@4.0.1"
info Reasons this module exists
   - "got" depends on it
   - Hoisted from "got#timed-out"
   - Hoisted from "gatsby-plugin-sharp#imagemin-mozjpeg#mozjpeg#bin-build#download#got#timed-out"
info Disk size without dependencies: "16KB"
info Disk size with unique dependencies: "16KB"
info Disk size with transitive dependencies: "16KB"
info Number of shared dependencies: 0
Done in 0.88s.

@itsmeow
Copy link
Contributor

itsmeow commented Mar 6, 2021

npm list timed-out
itsmeow.dev@1.0.0 C:\Users\itsmeow\Desktop\Development\js\itsmeow.dev
+-- gatsby@3.0.3
| `-- got@8.3.2
|   `-- timed-out@4.0.1
`-- gatsby-plugin-sharp@3.0.0
  `-- imagemin-mozjpeg@9.0.0
    `-- mozjpeg@7.0.0
      `-- bin-build@3.0.0
        `-- download@6.2.5
          `-- got@7.1.0
            `-- timed-out@4.0.1  deduped

Looks like old got versions, timed-out has been removed in newer versions of got. Not sure how this could be solved. This only started happening after I added some remote file nodes for sharp as shown in this guide.

@precious-void
Copy link
Author

@wardpeet I have the same outputs as @itsmeow
So yeah, it's related to got.

@precious-void
Copy link
Author

@wardpeet @pieh any comments on this issue?

@Daviidxo
Copy link

As a workaround I did the following:

  1. yarn upgrade
  2. yarn add gatsby-plugin-sharp@3.1.0
  3. yarn add gatsby-source-filesystem@3.0.0

Until this issue is fixed I locked this two plugin's version and now the error disappeared.

@shaurov
Copy link

shaurov commented Apr 8, 2021

having the same issue here...!

Fetching Google Sheet [Function] 1ZGdsv0kXpAZQB0XM4APP9WX0iQUYqEq3Wjjp8fXnko8

 ERROR

(node:17740) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

i have also tried with migrated to...

  "gatsby-plugin-manifest": "^3.2.0",
  "gatsby-plugin-sharp": "3.1.0",
  "gatsby-source-filesystem": "3.0.0",

but that doesn't work for me.

my gatsby-node.js file:

const { createRemoteFileNode } = require(`gatsby-source-filesystem`)

exports.onCreateNode = async (
  {
    actions: { createNode },
    node,
    createContentDigest,
    store,
    cache,
    reporter,
  },
  { nodeName = `localFile` }
) => {
  if (
    node.internal.type === `googleMenuSheet` &&
    node.itemCategoryImage !== null
  ) {
    const fileNode = await createRemoteFileNode({
      url: node.itemCategoryImage,
      store,
      cache,
      createNode,
      createNodeId: createContentDigest,
      reporter,
    })

    if (fileNode) {
      const fileNodeLink = `${nodeName}___NODE`
      node[fileNodeLink] = fileNode.id
    }
  }
}

@adrianopulz
Copy link

The same issue here. The gatsby-plugin-sharp > Got > Time-Out is using the _headers deprecated method. The @Daviidxo solution is working for me until having a better solution.

@shaurov
Copy link

shaurov commented Apr 12, 2021

@KyleAMathews have some comments about this issue. thank you

@shaurov
Copy link

shaurov commented Apr 12, 2021

dear friends, raising the version of got solves the issue for me.

yarn add got@latest

thanks to this blog...
https://kikunantoka.com/2021/03/15--migrate-from-gatsby-v2-to-gatsby-v3/

@github-actions
Copy link

github-actions bot commented May 3, 2021

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label May 3, 2021
@sallakos
Copy link

This issue still persists with everything up to date.

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label May 18, 2021
@github-actions
Copy link

github-actions bot commented Jun 8, 2021

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Jun 8, 2021
@dvdrtrgn
Copy link

Following the tutorial at https://www.gatsbyjs.com/docs/tutorial/part-3/ and this:

(node:73478) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use node --trace-deprecation ... to show where the warning was created)

is blocking progress.
The result is malformed markup and this:

GET http://localhost:8000/static/8fe15b6557b8e11d33c198a6a9024136/de790/E1oMV3QVgAIr1NT.webp
instead of
https://pbs.twimg.com/media/E1oMV3QVgAIr1NT?format=jpg&name=large

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Jun 11, 2021
@LinnJS
Copy link

LinnJS commented Jun 21, 2021

Getting the same error when upgraded

image

@spiraljacobs
Copy link

spiraljacobs commented Jun 26, 2021

Also getting this issue. Still showing up with latest versions of everything.
This did fix it for now:
npm install got@latest

@Minneanimal
Copy link

I ran into this issue while following the Gatsby v3 tutorial. Installing the latest got package also resolved the issue for me.

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Jul 30, 2021
@ThomasLaukkanen
Copy link

dear friends, raising the version of got solves the issue for me.

yarn add got@latest

thanks to this blog...
https://kikunantoka.com/2021/03/15--migrate-from-gatsby-v2-to-gatsby-v3/

This worked for me with this error: [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
Thank you so much!

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 21, 2021
@Vacilando
Copy link
Contributor

npm install got@latest indeed fixes the problem but it's not a clean solution.
"got" has to be upgraded in the plugin where it is defined as dependency.

@jackzhujie
Copy link

NODE_OPTIONS=--trace-deprecation gatsby develop should print stack trace that should help narrowing it down

i add the Environment variable in run app after, the error show in log4js package.

@github-actions
Copy link

github-actions bot commented Oct 4, 2021

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 4, 2021
@github-actions
Copy link

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: needs more info Needs triaging and reproducible examples or more information to be resolved type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests