react-json-table
react-json-table copied to clipboard
module not found
I installed react-json-table with npm install react-json-table --save, but I'm getting the error "Module not found: Can't resolve 'react-json-table'." Any idea why it's not working?
You getting that error when running npm install react-json-table --save?
I'm getting the error on my site after running that
Sorry, not following you.
You are running npm install react-json-table --save in your project that contains package.json file and that command throws the error above? Or are you running code trying to use it and getting the error?
I'm running npm install react-json-table --save in my project with a package.json file, but then when I run the code trying to use the package, my site won't build because of the error.
You need to provide full code that you trying to execute and throws error.
import statement: import { JsonTable } from 'react-json-table'
in my render(): <JsonTable rows={this.state.data}/>
Try const JsonTable = require('react-json-table'); instead.
I'll try that! I was actually able to make it work by using ts-react-json-table instead.