当我运行appc setup
时,它总是失败。
$ appc setup
Finding latest version ...5.2.2 ✓
Version 5.2.2 already installed.
? Do you plan on developing Titanium apps? Yes
Checking your environment...
You have the latest Titanium SDK release 5.2.2.GA
2016-05-12T08:52:33.552Z | ERROR | titanium exited with 1 exit code
虽然appc new
和appc ti build -p ios
有效(有警告),但
$ appc new
[Error: Module version mismatch. Expected 46, got 14.]
Appcelerator Command-Line Interface, version 5.2.2
Copyright (c) 2014-2016, Appcelerator, Inc. All Rights Reserved.
? What type of project are you creating? Native App (app)
? Which SDK would you like to use? Titanium SDK (JavaScript)
? What's the project name? myapp
? What's your application id (example: com.myapp)? com.myapp
*** new completed. ***
$ cd myapp && appc ti build -p ios
[Error: Module version mismatch. Expected 46, got 14.]
Appcelerator Command-Line Interface, version 5.2.2
Copyright (c) 2014-2016, Appcelerator, Inc. All Rights Reserved.
5/12/2016, 6:15:05 PM
Operating System
Name = Mac OS X
Version = 10.11.4
Architecture = 64bit
# CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 4.4.4
npm Version = 2.15.1
Titanium CLI
CLI Version = 5.0.6
Titanium SDK
SDK Version = 5.2.2.GA
SDK Path = /Users/takayuki/Library/Application Support/Titanium/mobilesdk/osx/5.2.2.GA
Target Platform = iphone
Command
/Users/takayuki/.nvm/versions/node/v4.4.4/bin/node /Users/takayuki/.appcelerator/install/5.2.2/package/node_modules/titanium/lib/titanium.js build -p ios --config-file /var/folders/4t/gzzx7fhx51nbc_wqxl80jx6h0000gn/T/build-1463044502821.json --log-level info --no-banner --project-dir /Users/takayuki/tmp/x/myapp
...
...
appc ti build -p android
没有。
$ appc ti build -p android
[Error: Module version mismatch. Expected 46, got 14.]
Appcelerator Command-Line Interface, version 5.2.2
Copyright (c) 2014-2016, Appcelerator, Inc. All Rights Reserved.
An uncaught exception was thrown!
Cannot read property 'version' of undefined
Cannot read property 'version' of undefined
我该如何解决这个问题?