Reputation: 1234
This project using react ^17.0.1" with fluentui/react-northstar
but I am getting error as below package.json while running npm i @fluentui/react-northstar. what can be the reason ?
npm i @fluentui/react-northstar npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"^17.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.0" from @fluentui/[email protected] npm ERR! node_modules/@fluentui/react-northstar npm ERR!
@fluentui/react-northstar@"*" from the root project
package.json
{
"name": "client-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.4.0",
"@types/node": "^16.11.21",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.0",
"typescript": "^4.5.5",
"web-vitals": "^2.1.4"
},
"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"
]
}
}
Upvotes: 0
Views: 708
Reputation: 11
It seems like older versions of the fluientUI library require React16, which is the error you are hitting as you are running React17.
I have a project which uses react 17 and was able to install the following versions:
"@fluentui/react-icons-northstar": "^0.64.0",
"@fluentui/react-northstar": "^0.64.0",
Upvotes: 0