node.js - 急!ionic上传本地项目到平台(Ionic View)时出错
大家讲道理
大家讲道理 2017-04-17 14:56:27
0
1
483

我要在真机上预览本地项目,手机上下载app ‘Ionic View’,然后要在ionic网站注册一个账号,本地命令行登录后切到项目目录下运行ionic upload命令将项目上传,再在手机的‘Ionic View’上登录就可以真机运行项目了。但是在运行完ionic upload之后报错,错误如下:

Uploading app....
An error occurred uploading the build: SyntaxError: Unexpected token <

SyntaxError: Unexpected token <
    at Object.parse (native)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/upload.js:300:25)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:921:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)


Unexpected token < (CLI v2.0.0)

Your system information:

Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
ios-deploy version: Not installed
ios-sim version: 5.0.8 
OS: Mac OS X El Capitan
Node Version: v4.5.0
Xcode version: Xcode 7.3.1 Build version 7D1014 

开发系统:mac 测试设备:ios
想知道这是什么意思,怎么解决,求帮忙。

我的主要目的是在真机上运行我的app,调试或者预览都可以,但是我在打包时也报错了,错误如下:

The following build commands failed:

    ProcessPCH /Applications/XAMPP/xamppfiles/htdocs/saxe_app_web/platforms/ios/build/sharedpch/CordovaLib_Prefix-esfsteftyiiwmubuqszgkwrzkyeb/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Applications/XAMPP/xamppfiles/htdocs/saxe_app_web/platforms/ios/cordova/build-debug.xcconfig,-project,foodSafety.xcodeproj,ARCHS=i386,-target,foodSafety,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Applications/XAMPP/xamppfiles/htdocs/saxe_app_web/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Applications/XAMPP/xamppfiles/htdocs/saxe_app_web/platforms/ios/build/sharedpch

该怎么办呢,这两个问题能解决一个就好,能在手机上看就行。
大家有没有遇到过这种问题,该怎么解决?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
左手右手慢动作

The most perfect solution should be to open it with xcode. After connecting the mobile phone, you can directly debug it on the real device. There is a problem with ionic view, and it is still a little different from the real device. For example, some cordova plug-ins cannot be used there

ionic build ios

Then use xcode to open the generated /platforms/ios/your project name.

You have to check the specific steps online~

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template