Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-select is a dependency (not devDependency) for installing this package #36

Open
igozali opened this issue Jun 18, 2018 · 4 comments
Assignees
Labels

Comments

@igozali
Copy link

igozali commented Jun 18, 2018

Using webpack, npm i react-network-diagrams gives me this.

ERROR in ./node_modules/react-network-diagrams/lib/components/MapEditor.js
Module not found: Error: Can't resolve 'react-select' in '/Users/xyz/project/node_modules/react-network-diagrams/lib/components'
 @ ./node_modules/react-network-diagrams/lib/components/MapEditor.js 22:19-42
 @ ./node_modules/react-network-diagrams/lib/index.js
 @ ./project/js/components/Network.js
 @ ./project/js/components/App.js
 @ ./project/js/index.js
 @ multi babel-polyfill ./project/js/index.js
@sartaj10
Copy link
Contributor

@igozali
It's working fine on my end.

screen shot 2018-06-19 at 10 40 08 am

Also, react-select is a devDependency only, as seen in this file
https://github.com/esnet/react-network-diagrams/blob/master/packages/react-network-diagrams/package.json

@igozali
Copy link
Author

igozali commented Jun 19, 2018

My bad, I wasn't being clear. Doesn't the MapEditor.js component need react-select? npm i react-network-diagrams works fine, but when I import something from 'react-network-diagrams', that's when the error message I mentioned in my initial comment shows up.

@rudolph9
Copy link

I'm running into a similar issue

[ error ] /app/node_modules/react-network-diagrams/lib/components/MapEditor.js
Module not found: Can't resolve 'react-select' in '/app/node_modules/react-network-diagrams/lib/components'
ModuleNotFoundError: Module not found: Error: Can't resolve 'react-select' in '/app/node_modules/react-network-diagrams/lib/components'
    at factory.create (/app/node_modules/webpack/lib/Compilation.js:823:10)
    at factory (/app/node_modules/webpack/lib/NormalModuleFactory.js:397:22)
    at resolver (/app/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
    at asyncLib.parallel (/app/node_modules/webpack/lib/NormalModuleFactory.js:224:22)
    at /app/node_modules/neo-async/async.js:2830:7
    at /app/node_modules/neo-async/async.js:6877:13
    at normalResolver.resolve (/app/node_modules/webpack/lib/NormalModuleFactory.js:214:25)
    at doResolve (/app/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
    at hook.callAsync (/app/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at resolver.doResolve (/app/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
    at hook.callAsync (/app/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at hook.callAsync (/app/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at resolver.doResolve (/app/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38)

from my yarn.lock

react-network-diagrams@^0.8.0:
  version "0.8.0"
  resolved "https://registry.yarnpkg.com/react-network-diagrams/-/react-network-diagrams-0.8.0.tgz#945705ffca674655753a1d6c7595854da1bea88e"
  integrity sha512-qHBnE3LtMCMxsehNX44owrCrR8SzgZNYYEjfwZKruPWhBBORIQXrffzhJamPI/2P4i+hinVM9IhDkBM1ucxrbA==
  dependencies:
    babel-runtime "^6.23.0"
    d3-scale "^2.0.0"
    keymirror "^0.1.1"
    prop-types "^15.5.10"
    underscore "^1.8.3"
    victor "^1.1.0"

@nmpatzios
Copy link

I have same problem

ModuleNotFoundError: Module not found: Error: Can't resolve 'react-select' in '/Users/nikos.batzios/jisc/react-weather-maps/node_modules/react-network-diagrams/lib/components'

does anyone found the solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants