esnet / react-network-diagrams

Contains ESnet network mapping and circuit rendering code, as used in the ESnet portal.
http://software.es.net/react-network-diagrams
Other
196 stars 37 forks source link

Module not found: Can't resolve 'react-network-diagrams' #35

Closed sartaj10 closed 6 years ago

sartaj10 commented 6 years ago

Upon creating a new project using create-react-app and adding the diagrams code from the master branch to package.json, get the following error

./src/App.js
Module not found: Can't resolve 'react-network-diagrams' in '/Users/ssbaveja/Desktop/Projects/test-diagrams/src'

Package.json looks like -

"dependencies": {
    "react": "^16.4.0",
    "react-dom": "^16.4.0",
    "react-scripts": "1.1.4",
    "react-network-diagrams": "git+https://github.com/esnet/react-network-diagrams.git#master"
  }
chenkunlia commented 6 years ago

maybe your config is wrong,you can change the dependecies like this: "dependencies": { "react": "^16.4.0", "react-dom": "^16.4.0", "react-scripts": "1.1.4", "react-network-diagrams": "0.8.0" }