Attempted import error: 'useBlocker' is not exported from 'react-router-dom'.
See original GitHub issueGetting Attempted import error:
package.json
{ "name": "my-cms", "version": "0.1.0", "private": true, "dependencies": { "@camberi/firecms": "^1.0.0-beta2", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", "@mui/icons-material": "5", "@mui/lab": "^5.0.0-alpha.49", "@mui/material": "5", "@mui/styles": "5", "firebase": "9", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.15", "@types/node": "^12.0.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-router": "^6.0.0-beta.7", "react-router-dom": "^6.0.0-beta.7", "react-scripts": "4.0.3", "typescript": "^4.1.2", "web-vitals": "^1.0.1" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }
Node Version:
v12.20.0
Npm Version:
6.14.8
Yarn version:
1.22.10
Tried via yarn and node. Unable to kickstart project. Did upgrading of node version as well. Please suggest anything which works
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
That is correct, they have unfortunately removed
useBlocker
from react-router, We will fix it in the next versionGetting the same error with these versions:
"react": "^17.0.1", "react-dom": "^17.0.1", "react-router-dom": "^6.0.2",