react-data-grid
react-data-grid copied to clipboard
Cannot find module Recharts
-
Have you already searched for similar issues? Please help us out and double-check first! Yes
-
Also, please don't be that person who deletes this template. It's here for a reason.
-
Thanks!
I'm submitting a ...
- [x] 🐛 Bug Report
- [ ] 💡 Feature Request
Issue Details
I tried running the examples on a docker container (node:9.8.0) but I get this whenever it is starting up
ERROR in ./packages/react-data-grid-examples/src/scripts/example31-isScrolling.js
Module not found: Error: Cannot resolve module 'Recharts' in /usr/src/app/packages/react-data-grid-examples/src/scripts
@ ./packages/react-data-grid-examples/src/scripts/example31-isScrolling.js 19:16-35
webpack: Failed to compile.
This is my dockerfile
FROM node:9.8.0
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app/
RUN npm install --unsafe-perm
EXPOSE 8080
EXPOSE 80
CMD ["npm", "run", "dev-server"]
I got it fixed.
Apparently, it requires that I change the import {AreaChart, Area} from 'Recharts'; to import {AreaChart, Area} from 'recharts'; inside ./packages/react-data-grid-examples/src/scripts/example31-isScrolling.js
This must be a case sensitivity issue with linux images.
It is safe to close this.