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

fix(gatsby): add react-com as devDep #32865

Merged
merged 2 commits into from
Aug 24, 2021
Merged

fix(gatsby): add react-com as devDep #32865

merged 2 commits into from
Aug 24, 2021

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Aug 20, 2021

Add dev-dependency on @types/react-dom, missed in #22854 ❤️

yarn typecheck currently passes because node_modules contains @types/react-dom -- I think because gatsby-plugin-image already dev-depends on it? However packages/gatsby/index.d.ts depends on @types/react-dom since #22854.

My Gatsby project doesn't have an existing dependency on gatsby-plugin-image or @types/react-dom, so I get the following error when I typecheck my project:

$ npm test
node_modules/gatsby/index.d.ts:2:26 - error TS7016: Could not find a declaration file for module 'react-dom'.

2 import { Renderer } from "react-dom"
                           ~~~~~~~~~~~

Found 1 error.

This PR addresses that by adding the previously-undeclared dev-dependency.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 20, 2021
@LekoArts LekoArts added topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 23, 2021
@LekoArts
Copy link
Contributor

Hi!

You'll need to run yarn at the root of the monorepo to also change the yarn.lock file.

@jablko
Copy link
Contributor Author

jablko commented Aug 23, 2021

@LekoArts Thanks! I've now added the yarn.lock file to this PR. ✔️

Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@LekoArts LekoArts changed the title fix(deps): .d.ts depends on @types/react-dom since #22854 fix(gatsby): add react-com as devDep Aug 24, 2021
@LekoArts LekoArts merged commit d81c9e1 into gatsbyjs:master Aug 24, 2021
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants