React native - SyntaxError:意外的令牌)

时间:2016-06-03 20:02:13

标签: javascript android node.js windows react-native

运行react-native start时,出现以下错误:

c:\app\node_modules\react-native\packager\react-packager\src\Server\index.js:549
      ),
      ^
SyntaxError: Unexpected token )
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Module._extensions..js (module.js:405:10)
    at Object.require.extensions.(anonymous function) [as .js] (c:\app\node_modules\babel-register\lib\node.js:166:7)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (buildBundle.js:14:16)
    at Module._compile (module.js:398:26)

这是在Windows 10上运行节点v6.2.1和npm v3.9.3。我正在运行最新版本的react-native,0.26.3。

每次运行react-native时都会发生这种情况,initrun-android也是如此。

这似乎是巴塞尔在Windows上的一个问题,但我不确定。

0 个答案:

没有答案