javascript - 面临错误 (0 , (_wordwrap || _load_wordwrap(...)).default)(...)(...).trimStart 不是 expo init 上的函数
问题描述
我正在尝试使用Expo创建本机应用程序。根据 react native 官方文档,我已经在我的 windows 系统上安装了 Node 8+ (v8.12.0) & expo-cli 然后运行 command 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.
当我启用世博调试时,它的给予
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)
请帮助解决这个问题。我错过了什么?
解决方案
你要做的基本上是将expo客户端更新到2.6.11,然后将node.js更新到大于10.0的版本(10或更高版本)并安装git。之后,运行命令
expo init <app-name>
根据世博会文档,
您需要在计算机上安装 Node.js(版本 10 或更高版本)。下载最新版本的 Node.js。此外,您需要 Git 来使用 Expo CLI 创建新项目
请参阅Getting Started-React Native以获得全面的指南。
推荐阅读
- ansible - Ansible 检查特定大小的未使用磁盘并创建卷组
- c# - 即使 Timeout 设置为 Int32.MaxValue,HttpWebRequest.GetResponse 也会超时
- angular - 从 Web API 到 Angular 客户端,需要验证 authenication Token
- python - 网络抓取以在您的管中查找实时视图
- sql - 将特定计数器列添加到 SQL Server 结果
- java - Unresolved Dependencies?
- php - 在 Woocommerce 中获取可变产品的正常价格
- ios - 如何在没有签名错误的情况下使用 GHCSlave?
- oracle - SQL Developer - 无法连接,侦听器当前不知道 SID/服务名称
- checkbox - 输入事件似乎在 vuetify 复选框上不可用?