面对错误(0,(_ wordwrap || _load_wordwrap(...)).默认)(...)(...).trimStart不是expo init上的函数

Shu*_*ode 7 javascript node.js reactjs react-native expo

我正在尝试用Expo创建反应原生应用程序.根据本机官方文档的反应,我在我的Windows系统上安装了Node 8+(v8.12.0)和expo-cli,然后运行命令expo init AwesomeProject.但它给出的错误是

(0 , (_wordwrap || _load_wordwrap(...)).default)(...)(...).trimStart is not a function
Set EXPO_DEBUG=true in your env to view the stack trace.
Run Code Online (Sandbox Code Playgroud)

当我启用expo debug时,它给出了

TypeError: (0 , (_wordwrap || _load_wordwrap(...)).default)(...)(...).trimStart
is not a function
    at C:\expo-cli@2.11.6\src\commands\init.js:105:19
    at Array.map (<anonymous>)
    at _callee$ (C:\expo-cli@2.11.6\src\commands\init.js:95:37)
    at tryCatch (C:\Users\shubhamt1\AppData\Roaming\npm\node_modules\expo-cli\no
de_modules\regenerator-runtime\runtime.js:62:40)
    at Generator.invoke [as _invoke] (C:\Users\shubhamt1\AppData\Roaming\npm\nod
e_modules\expo-cli\node_modules\regenerator-runtime\runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (C:\Users\shubhamt1\Ap
pData\Roaming\npm\node_modules\expo-cli\node_modules\regenerator-runtime\runtime
.js:114:21)
    at step (C:\Users\shubhamt1\AppData\Roaming\npm\node_modules\expo-cli\node_m
odules\babel-runtime\helpers\asyncToGenerator.js:17:30)
    at C:\Users\shubhamt1\AppData\Roaming\npm\node_modules\expo-cli\node_modules
\babel-runtime\helpers\asyncToGenerator.js:35:14
    at new Promise (<anonymous>)
    at new F (C:\Users\shubhamt1\AppData\Roaming\npm\node_modules\expo-cli\node_
modules\core-js\library\modules\_export.js:36:28)
Run Code Online (Sandbox Code Playgroud)

请帮忙.我错过了什么?

SVG*_*SVG 7

基本要做的是将expo客户端更新为2.6.11,然后将node.js更新为大于10.0的版本(10或更高版本)并安装git。之后,运行命令

expo init <app-name>

根据Expo docs的资料

您需要在计算机上安装Node.js(版本10或更高版本)。下载最新版本的Node.js。此外,您将需要Git使用Expo CLI创建新项目。

有关全面的指南,请参见《React入门-本机》。


use*_*190 1

使用较低版本的expo,我认为新版本仍处于测试阶段。