Urgent! An error occurred while the ionic uploaded the local project to the platform (Ionic View)

  node.js, question

I want to preview the local project on the real machine, download app’ ionicview’ on the mobile phone, and then register an account on the ionic website. after logging in on the local command line, cut to the project directory and run ionic upload command to upload the project, and then log in on the’ ionicview’ on the mobile phone to run the project on the real machine. However, an error was reported after running ionic upload. The error is as follows:

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

Development System: mac Test Equipment: ios
I want to know what this means, how to solve it, and ask for help.

My main purpose is to run my app on the real machine, either debugging or previewing, but I also reported an error when packing, the error is as follows:

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

What should I do? It’s good to solve one of these two problems. Just watch it on your mobile phone.
Have you ever encountered this kind of problem and how to solve it?

The most perfect solution should be to use xcode to open the phone and debug it directly on the real machine after connecting it. ionic view has some problems and there is still a gap with the real machine. For example, some cordova plug-ins cannot be used in it.

ionic build ios

Then use xcode to open the generated /platforms/ios/ your project name. xcodeProj file, then log in to your appleId, then fix, select your mobile phone on the left, and then click the triangle.

The specific steps should be checked online by yourself ~