[英]VS Code Intelli-sense does not show suggestions for react-icons even after installing react-icons properly using npm
[英]npm add react-icons installation does not work
我是React
的新手,我尝试下载react-icons
,但是出现了一个错误,这与我在这里找到的不同。 你能帮忙吗?
(base) Jana-MacBook-Air:react_project jb$ npm install react-icons --save
回复:
npm WARN saveError ENOENT: no such file or directory, open '/Users/jb/Desktop/react_project/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/jb/Desktop/react_project/package.json'
npm WARN react-icons@4.1.0 requires a peer of react@* but none is installed. You must install peer dependencies yourself.
npm WARN react_project No description
npm WARN react_project No repository field.
npm WARN react_project No README data
npm WARN react_project No license field.
+ react-icons@4.1.0
updated 1 package and audited 1 package in 1.875s
found 0 vulnerabilities
那么,您的项目根路径中有package.json
文件吗? The error is because that package have a peer dependency with react
and because it's not finding the package.json
file, then for the npm installation process, react
it's not installed.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.