2016-08-02 287 views
4

我正在尝试设置原生答案。但每当我更新文件它给m错误[email protected]需要[email protected]的同行,但没有安装

enoent ENOENT: no such file or directory, open 'React Native/package.json' 
npm WARN [email protected] requires a peer of [email protected] 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 

请让我知道我该怎么修复。

回答

6

安装反应应该修正这个错误

npm install react --save 

此外,您可以尝试升级react-native安装。 react-nativev0.30.0现在

npm update react-native 
0

为我工作的一些步骤:

1. watchman watch-del-all 
2. rm -rf node_modules 
3. npm install [email protected] --save 
4. npm install [email protected] --save 
5. npm install 
6. rm -fr $TMPDIR/react-* 
7. npm start -- --reset-cache 
相关问题