构建命令:
/Applications/Myapp/CocosCreator.app/Contents/MacOS/CocosCreator --path /Users/spring/SourceCode/myproj/myproj --build “platform=ios;debug=true”
项目目录肯定没错,里面有project.json文件,并且creator里面构建是没问题的.
完整错误如下:
[72983] Error: Build Failed: Error: Compile error: Invalid project path: /Users/spring/SourceCode/myproj/myproj
at EventEmitter. (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/page/compile-worker.js:1:5610)
at emitTwo (events.js:106:13)
at EventEmitter.emit (events.js:191:7)
at _main2rendererOpts (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/renderer/ipc.js:1:1282)
at EventEmitter. (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/renderer/ipc.js:1:5113)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/core/builder.js:1:1995
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/core/builder.js:1:944
at Gulp.doneCallback (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:11735)
at Gulp.Orchestrator.stop (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/orchestrator/index.js:150:9)
at n (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:3990)
at Object.callback (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:5859)
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:906:35
at _arrayEach (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:85:13)
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:898:17
[ error [========================================] 100% 0.0s ]
[72983] Error: Error: Compile error: Invalid project path: /Users/spring/SourceCode/myproj/myproj
at EventEmitter. (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/page/compile-worker.js:1:5610)
at emitTwo (events.js:106:13)
at EventEmitter.emit (events.js:191:7)
at _main2rendererOpts (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/renderer/ipc.js:1:1282)
at EventEmitter. (/Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/renderer/ipc.js:1:5113)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/init.js:1:8618
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/core/builder.js:1:4891
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:726:13
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:52:16
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:264:21
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:44:16
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:723:17
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:167:37
at /Applications/Myapp/CocosCreator.app/Contents/Resources/app.asar/editor/core/builder.js:1:2204