./node_modules/@react-pdf/font/lib/index.browser.es.js Attempted import error: 'create' is not exported from 'fontkit' (imported as 'fontkit'). Hi, I got this error while installing and build the react app. { "name": "frontend", "version": "1.0.0", "private": true, "dependencies": { "@craco/craco": "^6.4.3", "@react-pdf/renderer": "^2.0.21", "@reduxjs/toolkit": "^1.2.5", "animate.css": "^4.1.1", "apexcharts": "^3.29.0", "apexcharts-clevision": "^3.28.3", "aws-sdk": "^2.1315.0", "axios": "^0.24.0", "axios-mock-adapter": "^1.19.0", "bootstrap": "5.1.0", "bs-stepper": "^1.7.0", "chart.js": "^3.6.0", "chroma-js": "~2.1.0", "classnames": "^2.3.1", "cleave.js": "^1.6.0", "crypto-js": "^4.1.1", "draft-js": "^0.11.7", "draftjs-to-html": "^0.9.1", "file-saver": "^2.0.2", "flatpickr": "^4.6.3", "history": "^5.1.0", "html-to-draftjs": "^1.5.0", "html2pdf.js": "^0.10.1", "i18next": "^21.4.0", "i18next-browser-languagedetector": "^6.1.2", "i18next-xhr-backend": "^3.2.2", "jquery": "^3.5.1", "jsonwebtoken": "~8.5.1", "lodash": "^4.17.21", "moment": "^2.29.1", "moment-msdate": "^2.0.4", "nouislider": "^15.5.0", "nouislider-react": "^3.3.8", "postcss-rtl": "^1.5.0", "prismjs": "^1.19.0", "prop-types": "~15.7.2", "rc-input-number": "^7.3.3", "react": "^17.0.2", "react-apexcharts": "^1.3.9", "react-chartjs-2": "^3.3.0", "react-contexify": "^5.0.0", "react-copy-to-clipboard": "~5.0.2", "react-country-flag": "^2.0.1", "react-countup": "^6.4.2", "react-data-table-component": "^7.4.5", "react-dom": "^17.0.2", "react-draft-wysiwyg": "^1.14.5", "react-dropzone": "^11.4.2", "react-feather": "~2.0.3", "react-flatpickr": "^3.9.1", "react-google-autocomplete": "^2.6.1", "react-hook-form": "7.18.1", "react-i18next": "^11.13.0", "react-paginate": "^7.0.0", "react-perfect-scrollbar": "^1.5.5", "react-player": "^2.6.2", "react-rating": "^2.0.5", "react-redux": "^7.2.0", "react-router-dom": "^5.2.0", "react-scripts": "^4.0.2", "react-select": "^5.2.0", "react-shepherd": "^3.3.6", "react-slidedown": "^2.4.5", "react-sortablejs": "^6.0.0", "react-toastify": "^8.0.3", "reactstrap": "9.0.1", "recharts": "^2.0.4", "redux": "^4.0.5", "redux-debounced": "~0.5.0", "redux-thunk": "^2.4.0", }, "scripts": { "start": "craco start", "build": "craco build", "test": "craco test", "eject": "react-scripts eject", "lint": "eslint src//*.js src//.jsx", "lint:fix": "eslint src//.js --fix" }, "eslintConfig": { "extends": "react-app" }, "devDependencies": { "@types/sortablejs": "^1.10.6", "eslint": "^7.11.0", "eslint-plugin-import": "^2.22.0", "eslint-plugin-react": "^7.20.6", "sass-loader": "8.0.2" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ] }, "homepage": "" } this is my package,json file and webpack version is 4, I tried to upgrade the webpack to 5, it shows some other error, so I plan to move with version 4 and can anyone please help me! and I check with different versions of "@react-pdf/renderer": "^2.0.21", and it also shows error!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
./node_modules/@react-pdf/font/lib/index.browser.es.js
Attempted import error: 'create' is not exported from 'fontkit' (imported as 'fontkit').
Hi, I got this error while installing and build the react app.
{
"name": "frontend",
"version": "1.0.0",
"private": true,
"dependencies": {
"@craco/craco": "^6.4.3",
"@react-pdf/renderer": "^2.0.21",
"@reduxjs/toolkit": "^1.2.5",
"animate.css": "^4.1.1",
"apexcharts": "^3.29.0",
"apexcharts-clevision": "^3.28.3",
"aws-sdk": "^2.1315.0",
"axios": "^0.24.0",
"axios-mock-adapter": "^1.19.0",
"bootstrap": "5.1.0",
"bs-stepper": "^1.7.0",
"chart.js": "^3.6.0",
"chroma-js": "~2.1.0",
"classnames": "^2.3.1",
"cleave.js": "^1.6.0",
"crypto-js": "^4.1.1",
"draft-js": "^0.11.7",
"draftjs-to-html": "^0.9.1",
"file-saver": "^2.0.2",
"flatpickr": "^4.6.3",
"history": "^5.1.0",
"html-to-draftjs": "^1.5.0",
"html2pdf.js": "^0.10.1",
"i18next": "^21.4.0",
"i18next-browser-languagedetector": "^6.1.2",
"i18next-xhr-backend": "^3.2.2",
"jquery": "^3.5.1",
"jsonwebtoken": "~8.5.1",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"moment-msdate": "^2.0.4",
"nouislider": "^15.5.0",
"nouislider-react": "^3.3.8",
"postcss-rtl": "^1.5.0",
"prismjs": "^1.19.0",
"prop-types": "~15.7.2",
"rc-input-number": "^7.3.3",
"react": "^17.0.2",
"react-apexcharts": "^1.3.9",
"react-chartjs-2": "^3.3.0",
"react-contexify": "^5.0.0",
"react-copy-to-clipboard": "~5.0.2",
"react-country-flag": "^2.0.1",
"react-countup": "^6.4.2",
"react-data-table-component": "^7.4.5",
"react-dom": "^17.0.2",
"react-draft-wysiwyg": "^1.14.5",
"react-dropzone": "^11.4.2",
"react-feather": "~2.0.3",
"react-flatpickr": "^3.9.1",
"react-google-autocomplete": "^2.6.1",
"react-hook-form": "7.18.1",
"react-i18next": "^11.13.0",
"react-paginate": "^7.0.0",
"react-perfect-scrollbar": "^1.5.5",
"react-player": "^2.6.2",
"react-rating": "^2.0.5",
"react-redux": "^7.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.2",
"react-select": "^5.2.0",
"react-shepherd": "^3.3.6",
"react-slidedown": "^2.4.5",
"react-sortablejs": "^6.0.0",
"react-toastify": "^8.0.3",
"reactstrap": "9.0.1",
"recharts": "^2.0.4",
"redux": "^4.0.5",
"redux-debounced": "~0.5.0",
"redux-thunk": "^2.4.0",
},
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"lint": "eslint src//*.js src//.jsx",
"lint:fix": "eslint src//.js --fix"
},
"eslintConfig": {
"extends": "react-app"
},
"devDependencies": {
"@types/sortablejs": "^1.10.6",
"eslint": "^7.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-react": "^7.20.6",
"sass-loader": "8.0.2"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
]
},
"homepage": ""
}
this is my package,json file and webpack version is 4, I tried to upgrade the webpack to 5, it shows some other error, so I plan to move with version 4 and can anyone please help me! and I check with different versions of "@react-pdf/renderer": "^2.0.21", and it also shows error!