当试图在windows 10机器上运行“react本机”时,它会返回一个语法错误:
C:\Users\josetapadas\githubissue\node_modules\react-native\packager\react-packager\src\node-haste\index.js:40
constructor({
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Module._extensions..js (module.js:416:10)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\José Alves\src\AwesomeProject\node_modules\react-native\node_modules\babel-register\lib\node.js:154:7)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\Users\José Alves\src\AwesomeProject\node_modules\react-native\local-cli\server\util/attachHMRServer.js:11:34)
at Module._compile (module.js:409:26)我基本上已经下载了react本机-cli,并试图引导一个新项目。
npm install -g react-native-cli
react-native下面是我现在安装在Windows 10机器上的以下版本:
这个错误是否影响到任何人和任何人有一个如何解决它的线索?
谢谢!
发布于 2017-06-14 21:59:42
这应与反应-本机0.41及以上修正。
https://stackoverflow.com/questions/39632926
复制相似问题