[email protected] requires a peer of react@^15.0.0 but none is installed. You must install peer dependencies yourself.
I am very new to React. I installed the following open source project:
npm install --save react-tag-autoplete.
I was following the documentation stated here:
From the looks of it, I feel I have an older version of React. Am I correct? How can I fix it?
Here is the package.json
{
"name": "reacttaggautoplete",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-scripts": "1.1.0",
"react-tag-autoplete": "^5.5.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
[email protected] requires a peer of react@^15.0.0 but none is installed. You must install peer dependencies yourself.
I am very new to React. I installed the following open source project:
npm install --save react-tag-autoplete.
I was following the documentation stated here: https://www.npmjs./package/react-tag-autoplete
From the looks of it, I feel I have an older version of React. Am I correct? How can I fix it?
Here is the package.json
{
"name": "reacttaggautoplete",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-scripts": "1.1.0",
"react-tag-autoplete": "^5.5.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
Share
Improve this question
edited Dec 2, 2018 at 15:05
Roy Scheffers
3,90811 gold badges33 silver badges36 bronze badges
asked Feb 5, 2018 at 14:21
JavaDeveloperJavaDeveloper
5,68019 gold badges89 silver badges143 bronze badges
1
-
Does the project work with react@15 missing? It may be fine with react@16 and
react-tag-autoplete
's package.json just needs to bump their peer dependency version. – bcr Commented Feb 5, 2018 at 14:31
2 Answers
Reset to default 1Aparently you have installed React 16.2 so I'm guessing the problem is that react-tag-autoplete hasn't been updated to be used with the newer versions of react.
You could change the react dependency to "react": "^15.0.0"
and then do a npm update
and you should be fine (that will downgrade you to react 15).
Install the package to solve it
npm install react@^15.0.0
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745625730a4636792.html
评论列表(0条)