React don't see 'file-saver' although it was installed.
I made yarn add file-saver
, then yarn install
and still nothing.
It's imported like :
import { saveAs } from 'file-saver';
in package.json looks like:
"dependencies": {
"@emotion/is-prop-valid": "^1.1.0",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.11.2",
"@mui/lab": "^5.0.0-alpha.48",
"@mui/material": "^5.0.1",
"@types/file-saver": "^2.0.3",
"@types/react-table": "^7.7.2",
"axios": "0.21.1",
"core-js": "^3.6.5",
"date-fns": "^2.24.0",
"document-register-element": "1.13.1",
"file-saver": "^2.0.5",
thanks
Try adding also "@types/file-saver": "^2.0.5", apart of "file-saver": "^2.0.5"