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

DeprecationWarning: Invalid 'main' field in [...]/gatsby/dist/internal-plugins/functions/package.json' of 'index.ts' #31845

Closed
Hahlh opened this issue Jun 9, 2021 · 2 comments · Fixed by #31899
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@Hahlh
Copy link
Contributor

Hahlh commented Jun 9, 2021

Description

After a migration from v2 to v3 and fighting through a jungle of dependency conflicts, I finally arrived at a successful build.

There were (are) 3 deprecation warnings:

  1. DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
  2. DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at [...]/]tslib/package.json. Update this package.json to use a subpath pattern like "./*".
  3. DeprecationWarning: Invalid 'main' field in [...]/gatsby/dist/internal-plugins/functions/package.json' of 'index.ts'
    ([...] omitted for readability)

Number one got solved by manually npm i got@latest.

The other two still persist.

This issue is meant to document number three as there apparently aren't any related issues so far.
The others are included for context.

Functions aren't used within the project (besides Netlify functions).

Environment:

  System:
    OS: Linux 5.10 Manjaro Linux
    CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 16.1.0 - /usr/bin/node
    Yarn: 1.22.10 - ~/.npm-packages/bin/yarn
    npm: 7.12.1 - /usr/bin/npm
  Languages:
    Python: 3.9.5 - /usr/bin/python
  Browsers:
    Firefox: 89.0
  npmPackages:
    gatsby: ^3.7.0 => 3.7.0 
    gatsby-background-image: ^1.5.3 => 1.5.3 
    gatsby-image: ^3.7.0 => 3.7.0 
    gatsby-plugin-anchor-links: ^1.2.1 => 1.2.1 
    gatsby-plugin-gdpr-cookies: ^2.0.1 => 2.0.1 
    gatsby-plugin-image: ^1.7.0 => 1.7.0 
    gatsby-plugin-manifest: ^3.7.0 => 3.7.0 
    gatsby-plugin-netlify: ^3.7.0 => 3.7.0 
    gatsby-plugin-postcss: ^4.7.0 => 4.7.0 
    gatsby-plugin-preact: ^5.7.0 => 5.7.0 
    gatsby-plugin-preconnect: ^1.2.0 => 1.2.0 
    gatsby-plugin-react-helmet: ^4.7.0 => 4.7.0 
    gatsby-plugin-remove-fingerprints: 0.0.2 => 0.0.2 
    gatsby-plugin-sass: ^4.7.0 => 4.7.0 
    gatsby-plugin-scroll-reveal: 0.0.7 => 0.0.7 
    gatsby-plugin-sharp: ^3.7.0 => 3.7.0 
    gatsby-plugin-transition-link: ^1.20.5 => 1.20.5 
    gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.22 => 1.1.22 
    gatsby-source-filesystem: ^3.7.0 => 3.7.0 
    gatsby-source-prismic: ^3.3.6 => 3.3.6 
    gatsby-transformer-remark: ^4.4.0 => 4.4.0 
    gatsby-transformer-sharp: ^3.7.0 => 3.7.0 
  npmGlobalPackages:
    gatsby-cli: 3.6.0
@Hahlh Hahlh added the type: bug An issue or pull request relating to a bug in Gatsby label Jun 9, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 9, 2021
@cuteSeagullDev
Copy link

I just got message #3 after updating today. Also no serverless functions for this project.

Ubuntu 20.04
Node v16.3.0
npm 7.15.1
Gatsby 3.7.1
Gatsby CLI 3.7.0

@t2ca
Copy link
Contributor

t2ca commented Jun 10, 2021

I've seen these warnings for a little while now. I'm also getting this other one.

(node:40233) [DEP0148] DeprecationWarning: Use of
deprecated folder mapping "./" in the "exports" field
module resolution of the package at
/node_modules/gatsby/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".

@TylerBarnes TylerBarnes added status: needs core review Currently awaiting review from Core team member v3migration and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 11, 2021
sidharthachatterjee added a commit that referenced this issue Jun 14, 2021
@sidharthachatterjee sidharthachatterjee removed status: needs core review Currently awaiting review from Core team member v3migration labels Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants