react-frame-component icon indicating copy to clipboard operation
react-frame-component copied to clipboard

Component uses prop-types dependency but does not declare it as a dependency

Open wojtekmaj opened this issue 1 year ago • 2 comments

Component uses prop-types dependency but does not declare it as a dependency resulting in app crashing if the user did not already install prop-types.

wojtekmaj avatar Apr 11 '23 10:04 wojtekmaj

It's listed as a peer-dependecy but I do know codesandbox complains it's missing, not sure if peer deps ever got ratified as an actual thing across different package managers

ryanseddon avatar Apr 17 '23 04:04 ryanseddon

Yarn and PNPM do not install peerDependencies and npm's decision to install them is generally frowned upon. The safest bet is always to declare dependencies you use as, well, dependencies. A notable exceptions could be react and react-dom since you usually don't want to have multiple copies of that.

wojtekmaj avatar Apr 17 '23 06:04 wojtekmaj