I use the same apollo.config.js with apollo@2.12.4 and apollo@2.12.3. apollo@2.12.3 work, but apollo@2.12.4 throw the error.
Intended outcome:
This command should work.
Actual outcome:
{ Error: Error in "Loading queries for my-engines-name": Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "/path-to-config/apollo.config.js", query: "", fragment: ""}
at Object.error (/path-to-node_modules/node_modules/@oclif/errors/lib/index.js:22:17)
at Generate.error (/path-to-node_modules/node_modules/@oclif/command/lib/command.js:48:23)
at OclifLoadingHandler.showError (/path-to-node_modules/node_modules/apollo/lib/OclifLoadingHandler.js:28:22)
at OclifLoadingHandler.handle (/path-to-node_modules/node_modules/apollo/lib/OclifLoadingHandler.js:13:18) oclif: { exit: 2 }, code: undefined }
(node:74358) UnhandledPromiseRejectionWarning: Error: Error initializing Apollo GraphQL project "my-engines-name": Error: Error in "Loading queries for my-engines-name": Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "path-to-node_modules/apollo.config.js", query: "", fragment: ""}
at Object.error (/path-to-node_modules/node_modules/@oclif/errors/lib/index.js:22:17)
at Generate.error (/path-to-node_modules/node_modules/@oclif/command/lib/command.js:48:23)
at OclifLoadingHandler.showError (/path-to-node_modules/node_modules/apollo/lib/OclifLoadingHandler.js:28:22)
at GraphQLProject.readyPromise.Promise.all.then.catch.error (/path-to-node_modules/node_modules/apollo-language-server/lib/project/base.js:44:33)
(node:74358) 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:74358) [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: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "/path-to-node_modules/apollo.config.js", query: "", fragment: ""}
at _validateUri (~/path-to-node_modules/node_modules/vscode-uri/lib/umd/index.js:52:23)
at _URI.URI (~/path-to-node_modules/node_modules/vscode-uri/lib/umd/index.js:153:17)
at new _URI (~/path-to-node_modules/node_modules/vscode-uri/lib/umd/index.js:355:51)
at Function.URI.parse (~/path-to-node_modules/node_modules/vscode-uri/lib/umd/index.js:265:20)
at exports.normalizeURI (~/path-to-node_modules/node_modules/apollo-language-server/lib/utilities/uri.js:17:39)
at Array.map (<anonymous>)
at FileSet.allFiles (~/path-to-node_modules/node_modules/apollo-language-server/lib/fileSet.js:29:14)
at new GraphQLClientProject (~/path-to-node_modules/node_modules/apollo-language-server/lib/project/client.js:40:21)
at Generate.createService (~/path-to-node_modules/node_modules/apollo/lib/Command.js:114:28)
at Generate.init (~/path-to-node_modules/node_modules/apollo/lib/Command.js:37:14)
How to reproduce the issue:
Run apollo client:codegen.
Versions
apollo: v2.12.4
I use the same
apollo.config.jswithapollo@2.12.4andapollo@2.12.3.apollo@2.12.3work, butapollo@2.12.4throw the error.Intended outcome:
This command should work.
Actual outcome:
{ Error: Error in "Loading queries for my-engines-name": Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "/path-to-config/apollo.config.js", query: "", fragment: ""} at Object.error (/path-to-node_modules/node_modules/@oclif/errors/lib/index.js:22:17) at Generate.error (/path-to-node_modules/node_modules/@oclif/command/lib/command.js:48:23) at OclifLoadingHandler.showError (/path-to-node_modules/node_modules/apollo/lib/OclifLoadingHandler.js:28:22) at OclifLoadingHandler.handle (/path-to-node_modules/node_modules/apollo/lib/OclifLoadingHandler.js:13:18) oclif: { exit: 2 }, code: undefined } (node:74358) UnhandledPromiseRejectionWarning: Error: Error initializing Apollo GraphQL project "my-engines-name": Error: Error in "Loading queries for my-engines-name": Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "path-to-node_modules/apollo.config.js", query: "", fragment: ""} at Object.error (/path-to-node_modules/node_modules/@oclif/errors/lib/index.js:22:17) at Generate.error (/path-to-node_modules/node_modules/@oclif/command/lib/command.js:48:23) at OclifLoadingHandler.showError (/path-to-node_modules/node_modules/apollo/lib/OclifLoadingHandler.js:28:22) at GraphQLProject.readyPromise.Promise.all.then.catch.error (/path-to-node_modules/node_modules/apollo-language-server/lib/project/base.js:44:33) (node:74358) 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:74358) [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: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "/path-to-node_modules/apollo.config.js", query: "", fragment: ""} at _validateUri (~/path-to-node_modules/node_modules/vscode-uri/lib/umd/index.js:52:23) at _URI.URI (~/path-to-node_modules/node_modules/vscode-uri/lib/umd/index.js:153:17) at new _URI (~/path-to-node_modules/node_modules/vscode-uri/lib/umd/index.js:355:51) at Function.URI.parse (~/path-to-node_modules/node_modules/vscode-uri/lib/umd/index.js:265:20) at exports.normalizeURI (~/path-to-node_modules/node_modules/apollo-language-server/lib/utilities/uri.js:17:39) at Array.map (<anonymous>) at FileSet.allFiles (~/path-to-node_modules/node_modules/apollo-language-server/lib/fileSet.js:29:14) at new GraphQLClientProject (~/path-to-node_modules/node_modules/apollo-language-server/lib/project/client.js:40:21) at Generate.createService (~/path-to-node_modules/node_modules/apollo/lib/Command.js:114:28) at Generate.init (~/path-to-node_modules/node_modules/apollo/lib/Command.js:37:14)How to reproduce the issue:
Run
apollo client:codegen.Versions
apollo: v2.12.4