2016-07-06 41 views
0

我正嘗試使用react-native構建示例UWP應用程序。這是我的package.JSON。react-native rnpm windiows拋出錯誤

` { 
    "name": "netizen_uwp", 
    "version": "0.0.1", 
    "private": true, 
    "scripts": { 
    "start": "node node_modules/react-native/local-cli/cli.js start" 
    }, 
    "dependencies": { 
    "react": "15.2.0-rc.1", 
    "react-native": "0.29.0-rc.0", 
    "react-native-windows": "0.29.0-rc.0" 
    }, 
    "main": "index.android.js", 
    "devDependencies": { 
    "rnpm-plugin-windows": "^0.1.1" 
    }, 
    "author": "", 
    "license": "ISC", 
    "description": "" 
}` 

當我運行> rnpm窗口,我收到連接錯誤,即使我所有的反應/反應母語/反應原生窗口模塊是最新的。 enter image description here

有人可以幫我嗎?

回答

0

這是react-native-windows作爲插件的一個普遍問題。我們總是稍微落後於反應原生的發行版。你可以使用--windowsVersion標誌已經解決了這個問題,如:

rnpm窗口--windowsVersion 0.29.0-rc.0

此外,作爲反應母語@> = 0.31的,你沒有更需要使用rnpm全局命令行,而實例只需使用命令「react-native windows」。