-
-
Notifications
You must be signed in to change notification settings - Fork 68
Fails to run example #1
Copy link
Copy link
Closed
Description
When I try to run the example given in readme, the following is returned:
ERROR in ./src/demo/App.js
Module not found: Error: Can't resolve 'react-cytoscapejs' in 'C:\Users\xingh\git\dash-cytoscape\src\demo'
@ ./src/demo/App.js 17:24-52
@ ./src/demo/index.js
@ multi ./src/demo/index.js
The following code is written in App.js:
/* eslint no-magic-numbers: 0 */
import React from 'react';
import ReactDOM from 'react-dom';
import CytoscapeComponent from 'react-cytoscapejs';
class App extends React.Component {
constructor(props){
super(props);
}
render(){
const elements = [
{ data: { id: 'one', label: 'Node 1' }, position: { x: 0, y: 0 } },
{ data: { id: 'two', label: 'Node 2' }, position: { x: 100, y: 0 } },
{ data: { source: 'one', target: 'two', label: 'Edge from Node1 to Node2' } }
];
return <CytoscapeComponent elements={elements} style="width: 600px; height: 600px;" />;
}
};
export default App;and ran in index.js (by calling NPM run start):
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('root'));Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels