apollo-ios: Command PhaseScriptExecution failed with a nonzero exit code (0.13.0)
I update apollo-iOS to a new version (0.13.0)
When I trying to make codegen for schema.json file I get error while running shell-script
i recieve message like this one:
++ npx --no-install apollo codegen:generate --target=swift '--includes=./**/*.graphql' --localSchemaFile=schema.json API.swift Loading Apollo Project [started] Loading Apollo Project [completed] Generating query files [started] Generating query files with 'swift' target [title changed] Generating query files with 'swift' target [failed] → No operations or fragments found to generate code for. (node:1521) UnhandledPromiseRejectionWarning: Error: No operations or fragments found to generate code for. at write (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo/lib/commands/client/codegen.js:61:39) at GraphQLClientProject._onDiagnostics (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo/lib/commands/client/codegen.js:84:29) at GraphQLClientProject.validate (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo-language-server/lib/project/client.js:140:18) at GraphQLClientProject.validateIfNeeded (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo-language-server/lib/project/base.js:136:14) at Timeout._onTimeout (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo-language-server/lib/project/base.js:128:22) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7) (node:1521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:1521) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Error: No operations or fragments found to generate code for. at write (~/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo/lib/commands/client/codegen.js:61:39) at Task.task (~/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo/lib/commands/client/codegen.js:86:46) Command PhaseScriptExecution failed with a nonzero exit code
I am currently using apollo 2.16.1 and XCode 10.3. All steps are similar to apollo ios guide
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (10 by maintainers)
@joninsky and anyone else running into that issue: Please see the 0.13.0 release notes - that’s got info on how to fix that (spoiler: it’s about the change from a tuple to a
Result
)