我正在嘗試安裝並執行來自Facebook的Hello World sample。{Help}新建:設置
我有2個問題:
- 當我運行:
create-react-native-app AwesomeProject
我得到這個錯誤,這是什麼意思:
You are currently running Node v4.4.2 but create-react-native-app requires >=6. Please use a supported version of Node.
- 我的包.json:
{ "name": "AwesomeProject", "version": "0.1.0", "private": true, "scripts": { "test": "make test", "start": "node index.js" }, "devDependencies": { "react-native-scripts": "1.5.0" } }
當我npm開始時出現此錯誤:
SyntaxError: Unexpected reserved word at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:968:3
這是我從Facebook複製並粘貼的代碼Hello World示例。
謝謝。這項工作。僅供參考釀造不適用於更新。 –
@NhanCao我以爲它只是在操作系統上安裝和刪除軟件包,你必須自己檢查一下,因爲你將來會面臨多次與節點版本相關的問題。 – johnny