Skip to content

prop-types should be a production dependency #755

@kmoschcau

Description

@kmoschcau

Describe the bug

When trying to build a react native project with this library while using pnpm as a package manager, I get an UnableToResolveError for prop-types, because this is only listed as a devDependency in react-native-picker-select, even though it should be a production dependency.

Error: Unable to resolve module prop-types from C:\Users\KaiMoschcau\Code\blecon\Kunden\DSB\FlyForGold.Mobile\node_modules\.pnpm\react-native-picker-select@_72d513f5474d6d6adaa93d339c961e66\node_modules\react-native-picker-select\src\index.js: prop-types could not be found within the project or in these directories:
  node_modules\.pnpm\react-native-picker-select@_72d513f5474d6d6adaa93d339c961e66\node_modules
  node_modules\.pnpm\node_modules
  node_modules
  ..\..\..\node_modules

I can work around this for now, by adding prop-types as a production dependency to the project myself.

To Reproduce

Steps to reproduce the behavior:

  1. Create a react native project using pnpm as a package manager
  2. Install react-native-picker-select and @react-native-picker/picker as production dependencies
  3. Try to build using pnpm android
  4. See error

Expected behavior

The dependency is included by react-native-picker-select and found.

Screenshots

n/a

Additional details

  • Device: Blackview BV 5300 Pro
  • OS: DokeOS 4.0 (Android 14)
  • react-native-picker-select version: 9.3.1
  • react-native version: 0.85.2
  • expo sdk version: n/a

Reproduction and/or code sample

This is a build issue, I can't reproduce this in snacks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions