You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a project with the above structure.
A type error related to ReactNode occurs in apps/project-b using react v19.
The cause of the problem I thought was
This problem occurred because the declare namespace React statement declared in index.d.ts inside root/node_modules/@types+react18 and root/node_modules/@types+react19 were merged due to hoist in the package manager. I think.
This is an error caused by the type of react.
Would you recognize this as a problem?
The text was updated successfully, but these errors were encountered:
There was a request on the DT repo as well to remove the declare namespace. I don't know if that's safe to do and doesn't cause other breakages. I recommend filing a PR against https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react and see if this is compatible against every other @types/ package. Then we can discuss a rollout plan.
Summary
Hello, I am creating a service using monorepo structure via pnpm.
The development environment is as follows:
-pnpm
my-monorepo/
├── package.json
├── node_modules/
│ └── .pnpm/
└── apps/
├── project-a/
│ ├── package.json
│ └── node_modules/
│ ├── react/ # React 18
│ │ └── ...
│ └── @types/
│ └── react/ # @types/react 18
└── project-b/
├── package.json
└── node_modules/
├── react/ # React 19
└── @types/
└── react/ # @types/react 19
I am working on a project with the above structure.
A type error related to
ReactNode
occurs in apps/project-b usingreact v19
.The cause of the problem I thought was
This problem occurred because the
declare namespace React
statement declared inindex.d.ts
insideroot/node_modules/@types+react18
androot/node_modules/@types+react19
were merged due to hoist in the package manager. I think.This is an error caused by the type of react.
Would you recognize this as a problem?
The text was updated successfully, but these errors were encountered: