【发布时间】:2018-12-11 16:50:28
【问题描述】:
我通过Apollo 跟踪installation tutorial。我完全相信我按照installation tutorial 中的描述做了所有事情。但是,在构建项目期间,我收到了如下编译器错误:
TypeError: 无法读取未定义的属性“长度”
at Object.yargs.command.command.command.argv [as handler] (/usr/local/lib/node_modules/apollo-codegen/src/cli.js:186:17) at Object.runCommand (/usr/local/lib/node_modules/apollo- codegen/node_modules/yargs/lib/command.js:235:44) at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:1013:30) at Object.get [as argv] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:957:21) at Object.<anonymous> (/usr/local/lib/node_modules/apollo-codegen/lib/cli.js:197:5) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3)命令 /bin/sh 失败,退出代码为 1
和
++ exec apollo-codegen generate --schema schema.json --output API.swift
TypeError: 无法读取未定义的属性“长度”
at Object.yargs.command.command.command.argv [as handler] (/usr/local/lib/node_modules/apollo-codegen/src/cli.js:186:17) at Object.runCommand (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/lib/command.js:235:44) at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:1013:30) at Object.get [as argv] (/usr/local/lib/node_modules/apollo-codegen/node_modules/yargs/yargs.js:957:21) at Object.<anonymous> (/usr/local/lib/node_modules/apollo-codegen/lib/cli.js:197:5) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3)命令 PhaseScriptExecution 失败,退出代码非零
为什么我会收到此错误?
【问题讨论】:
标签: ios swift apollo apollo-client