2016-08-02 276 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 
相關問題