prop-types is required at runtime but only listed in devDependencies
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 77/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js, react
- Domain
- build-system, frontend
Research direction
Start by reading react-tagsinput.js and package.json; confirm that the module requires prop-types and inspect how it is declared. Check the package’s dependency setup and verify the module can load with a strict package layout such as pnpm or Yarn PnP. Done when the runtime dependency is available or the runtime require is removed, and loading the package succeeds.
Written by the indexing model from the issue text.
Description
react-tagsinput.js calls require('prop-types'), but package.json lists prop-types only in devDependencies. Package managers with strict layouts (pnpm, Yarn PnP) don’t make it available, so loading the module fails with:
Error: Cannot find module 'prop-types'
Require stack:
- node_modules/.pnpm/[email protected][email protected]/node_modules/react-tagsinput/react-tagsinput.js
It works with npm only when some other package happens to hoist prop-types.
Proposed fix: move prop-types to dependencies, or drop it, since React 19 ignores propTypes.
Version: 3.20.3
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 229
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from olahol/react-tagsinput
-
Difficulty 1/5 Under an hour Newbie friendliness 60/100
olahol/react-tagsinput#199 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
olahol/react-tagsinput#223 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
olahol/react-tagsinput#222 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 38/100
olahol/react-tagsinput#217 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
olahol/react-tagsinput#216 ·
All issues in olahol/react-tagsinput
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
MagicMirrorOrg/MagicMirror#4310 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bluerobotics/Cockpit-docs#48 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tc39/proposal-temporal#3332 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opennextjs/opennextjs-cloudflare#1461 ·
Maintainers usually reply within 1 day