Open igozali opened 6 years ago
@igozali It's working fine on my end.
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
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.
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"
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 ?
Using webpack,
npm i react-network-diagrams
gives me this.