Skip to content

The template lack deps @types/react #298

Closed
@hua03

Description

@hua03

Expected results

When use other package manager eg: npm, pnpm, no eslint errors are reported.

Observed results

when use pnpm install new package, there report import error:

TS7016: Could not find a declaration file for module 'react'. '/Users/huahao/WorkSpace/Project/Demo/ReactNativeTSApp/node_modules/.pnpm/react@18.1.0/node_modules/react/index.js' implicitly has an 'any' type.   If the 'react' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react'

Logs

no logs, this is a eslint error.

Steps to reproduce

  1. init react native project with typescript template, pnpx react-native init ReactNativeTSApp --template react-native-template-typescript
  2. install new package with pnpm, pnpm install @react-navigation/native

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions