react-rails icon indicating copy to clipboard operation
react-rails copied to clipboard

[react_ujs] Add peerDependency's

Open 0xdevalias opened this issue 5 years ago • 1 comments

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

0xdevalias avatar May 25 '19 22:05 0xdevalias

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

matthewbennink avatar May 15 '21 10:05 matthewbennink

@0xdevalias Closing the issue for now. If it's reproducible, please feel free to reopen it.

alkesh26 avatar Nov 07 '22 07:11 alkesh26