[英]what is the alternate for depreciation for XMLHttpRequest for file-saver?
[英]react cannot find file-saver although it was installed
盡管已安裝 React,但看不到“文件保護程序”。
我讓yarn add file-saver
,然后yarn install
仍然沒有。
它的導入方式如下: import { saveAs } from 'file-saver';
在 package.json 看起來像:
"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",
謝謝
嘗試添加“@types/file-saver”:“^2.0.5”,除了“file-saver”:“^2.0.5”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.