react-rails
react-rails copied to clipboard
[react_ujs] Add peerDependency's
Package uses react
and react-dom
, but doesn't list them in it's package.json
's peerDependency
's
- https://github.com/reactjs/react-rails/blob/master/react_ujs/index.js#L1-L3
- https://github.com/reactjs/react-rails/blob/master/package.json#L13-L18
Expected behavior
Package correctly specifies it's peerDependency
's
- https://nodejs.org/es/blog/npm/peer-dependencies/#using-peer-dependencies
Actual behavior
See https://github.com/pastelsky/bundlephobia/issues/166
This also seems to cause errors (below) when using Yarn's Plug'n'Play feature. Specifying the peer dependencies should resolve this error.
ERROR in ../../.yarn/cache/react_ujs-npm-2.6.1-033fb676ce-1f841546f9.zip/node_modules/react_ujs/react_ujs/index.js 1:12-28
Module not found: Error: Can't resolve 'react' in '/***/.yarn/cache/react_ujs-npm-2.6.1-033fb676ce-1f841546f9.zip/node_modules/react_ujs/react_ujs'
@ ./src/index.js 19:20-40
ERROR in ../../.yarn/cache/react_ujs-npm-2.6.1-033fb676ce-1f841546f9.zip/node_modules/react_ujs/react_ujs/index.js 2:15-35
Module not found: Error: Can't resolve 'react-dom' in '/***/.yarn/cache/react_ujs-npm-2.6.1-033fb676ce-1f841546f9.zip/node_modules/react_ujs/react_ujs'
@ ./src/index.js 19:20-40
ERROR in ../../.yarn/cache/react_ujs-npm-2.6.1-033fb676ce-1f841546f9.zip/node_modules/react_ujs/react_ujs/index.js 3:21-48
Module not found: Error: Can't resolve 'react-dom/server' in '/***/.yarn/cache/react_ujs-npm-2.6.1-033fb676ce-1f841546f9.zip/node_modules/react_ujs/react_ujs'
@ ./src/index.js 19:20-40
@0xdevalias Closing the issue for now. If it's reproducible, please feel free to reopen it.