React-native@0.26.3要求对等方为react@15.0.2,但没有安装

Mah*_*vir 12 node.js ios npm react-native

我正在尝试为本机做出反应.但每当我更新文件时,它都会出错

    enoent ENOENT: no such file or directory, open 'React Native/package.json'
npm WARN react-native@0.26.3 requires a peer of react@15.0.2 but none was installed.
npm WARN React Native No description
npm WARN React Native No repository field.
npm WARN React Native No README data
npm WARN React Native No license field.
   MacBook-Pro:React Native$ npm info react dist-tags.latest
Run Code Online (Sandbox Code Playgroud)

请让我知道如何解决.

Kyl*_*ley 11

安装react会修复错误

npm install react --save
Run Code Online (Sandbox Code Playgroud)

此外,您可以尝试升级react-native安装.react-native就像v0.30.0现在一样

npm update react-native
Run Code Online (Sandbox Code Playgroud)