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
This package is dependent of React, but its package.json does not mention React anywhere. Instead, the code uses a dynamic CommonJS require() in order to be able to show an error when React is not installed.
This may be solved with package.json's peerDependencies, which also allows us to specify which React version the code is compatible with. Here is an in-depth explanation from the node.js blog:
I've personally never used it before and there might be some pitfalls, so this change will need to be thoroughtly evaluated first.
The text was updated successfully, but these errors were encountered:
roberto-red
changed the title
Evaluate specifying React as a peerDependencies in package.json instead of failing at runtime
Evaluate specifying React in package.json's peerDependencies instead of failing at runtime
Mar 24, 2023
This package is dependent of React, but its
package.json
does not mention React anywhere. Instead, the code uses a dynamic CommonJSrequire()
in order to be able to show an error when React is not installed.This may be solved with
package.json
'speerDependencies
, which also allows us to specify which React version the code is compatible with. Here is an in-depth explanation from the node.js blog:https://nodejs.org/en/blog/npm/peer-dependencies
I've personally never used it before and there might be some pitfalls, so this change will need to be thoroughtly evaluated first.
The text was updated successfully, but these errors were encountered: