react-native 第三方组件导入失败

错误信息如下:

npm WARN saveError ENOENT: no such file or directory, open '/usr/local/bin/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/usr/local/bin/package.json'
npm WARN [email protected] requires a peer of react-native@>=0.33 but none is installed. You must install peer dependencies yourself.
npm WARN bin No description
npm WARN bin No repository field.
npm WARN bin No README data
npm WARN bin No license field.

解决:

控制台中,需要“cd”进入项目工程,里面有package.json文件,下载成功后,该文件会自动引入第三方组件。

猜你喜欢

转载自blog.csdn.net/Crazy_SunShine/article/details/80537481