【发布时间】:2017-01-03 06:13:18
【问题描述】:
如果我使用 livesync 运行本机脚本,iOS 模拟器会失败,但安卓模拟器不会。
我使用 NativeScript cli create 命令创建了项目。这是一个 Angular2 项目。如果我运行,我可以在 iOS 模拟器中有趣地运行该项目
tns run ios --emulator。 Android 也很好,但 livesync 不知何故中断了。我一直无法在网上找到任何具体的东西。
根据 github 上的一个帖子,这个问题应该已经在最新版本 2.4.2 上得到修复。
shell.js: internal error
Error: EEXIST: file already exists, symlink '../loose-envify/cli.js' -> '/Users/user/Desktop/app-sample/platforms/ios/app-sample/app/tns_modules/babel-traverse/node_modules/invariant/node_modules/.bin/loose-envify'
at Error (native)
at Object.fs.symlinkSync (fs.js:1054:18)
at cpdirSyncRecursive (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:76:10)
at cpdirSyncRecursive (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:73:7)
at cpdirSyncRecursive (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:73:7)
at cpdirSyncRecursive (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:73:7)
at cpdirSyncRecursive (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:73:7)
at /usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:183:9
at Array.forEach (native)
at Object._cp (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:157:11)
at Object.cp (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/common.js:186:23)
at TnsModulesCopy.copyDependencyDir (/usr/local/lib/node_modules/nativescript/lib/tools/node-modules/node-modules-dest-copy.js:42:21)
at _loop_1 (/usr/local/lib/node_modules/nativescript/lib/tools/node-modules/node-modules-dest-copy.js:17:20)
at TnsModulesCopy.copyModules (/usr/local/lib/node_modules/nativescript/lib/tools/node-modules/node-modules-dest-copy.js:31:13)
at /usr/local/lib/node_modules/nativescript/lib/tools/node-modules/node-modules-builder.js:129:32
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
【问题讨论】:
-
检查 tns 信息。如果您指向核心,ios 上的最新版本。它应该工作
-
嗨 @Habeeb 感谢您的回答。我到底在找什么。我想在控制台中运行它吗?如果是这样,我有他们所有人的最新消息。
-
│ Component │ Current version │ Latest version │ Information │ │ nativescript │ 2.4.2 │ 2.4.2 │ Up to date │ │ tns-core-modules │ 2.4.4 │ 2.4.4 │ Up to date │ │ tns-android │ 2.4.1 │ 2.4.1 │ Up to date │ │ tns-ios │ 2.4.0 │ 2.4.0 │ Up to date
标签: javascript android ios nativescript angular2-nativescript