1

I am trying to use react native vector icons in my project, but I getting error when installing it.

Below are the STEPS which I was running on my terminal:

STEP-1 : npm install react-native-elements --save

NO ERROR ON THIS STEP-1

STEP-2: npm install react-native-vector-icons --save

NO ERROR ON THIS STEP-2

STEP-3: react-native link react-native-vector-icons

ERROR:

react-native : The term 'react-native' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ react-native link react-native-vector-icons
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (react-native:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
4

2 回答 2

2

尝试npx react-native link react-native-vector-icons

于 2020-12-24T06:44:22.543 回答
2

如果您使用的是 0.60+ 以上的版本,则不需要使用链接命令。一旦 npm install 完成就做

cd ios && pod 安装

应该没问题

于 2020-12-24T06:53:26.543 回答