在 Mac 上创建基本的 nativescript 应用程序时出现问题 [英] Problem creating basic nativescript app on a mac

查看:57
本文介绍了在 Mac 上创建基本的 nativescript 应用程序时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习此视频中的极限初学者课程

I'm following the extreme beginner course on this video

https://courses.nativescripting.com/courses/169856/lectures/6887491

我在创建应用程序后在源代码上运行 npm install,但是当我运行命令时

I have after creating the app run a npm install on the source code, but when I run the command

tns run ios

它打开了一个 ipad 模拟器,但里面什么也没有,终端也有错误

it opens an ipad emulator but there is nothing in it and there is an error in the terminal

Executing webpack failed with exit code 1.

有人有线索吗?

谢谢

推荐答案

tns run xx 之前打开模拟器,之前也运行 tns devices 看看它们是不是都是可见的,模拟器和连接的设备.然后执行tns run xx.另外我希望你在这一切都井然有序之前做了tns doctor.

Turn on emulators before you do tns run xx, also run tns devices before to see are they are all visible, emulators and connected devices. Then do tns run xx. Also i hope you did tns doctor before all this to see is all in order.

我自己花了几天时间在 Big Sur 上进行设置.它运行良好(通过 android studio 的 xcode 模拟器 ios 和 android 模拟器,以及通过 USB 的 android 设备),但有些事情你需要自己弄清楚,不要太依赖文章,在我看来,事情变化很快.

Just spent couple of days setting it myself on Big Sur. It works well (xcode simulator ios and android emulators via android studio, and android device over usb) but some things you will need to figure out yourself, don't rely to much on articles, things change rapidly as it seems to me.

还有一些原因,比如你注意到 tns run ios 会一直尝试运行 iPad,所以你在 Dock 中保存了一个可以工作的 iPhone 模拟器,然后在你做 tns 运行.

Also for some reason like you noticed tns run ios will allwyas try to run iPad, so you save your self a working iPhone simulator in dock, and just turn on that before you do tns run.

这篇关于在 Mac 上创建基本的 nativescript 应用程序时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆