2016-05-31 7 views
-1

誰もこのエラーを見たことがありますか?私は最初のNodeJS/React/GraphQLプロジェクトに取り組んでいます。これは私を少し夢中にさせている。私はGoogleを検索したが、誰もこれまでにこの問題を抱えていたようだ。サーバエラー:ローカルネットワーク層のGraphQLエラーのエラー

error: Server error: local network layer GraphQL failure errors=[], _settled=true, _resolve=function (value) { 
    [1]  if (done) return; 
    [1]  done = true; 
    [1]  resolve(promise, value); 
    [1] }, _reject=function (reason) { 
    [1]  if (done) return; 
    [1]  done = true; 
    [1]  reject(promise, reason); 
    [1] }, _45=2, _81=2, , _54=null, text=query Routes { 
    [1] Viewer { 
    [1]  id, 
    [1]  ...F3 
    [1] } 
    [1] } 
    [1] fragment F0 on Viewer { 
    [1] User_IsAnonymous, 
    [1] User_DisplayName, 
    [1] User_ProfilePhoto, 
    [1] id 
    [1] } 
    [1] fragment F1 on Viewer { 
    [1] User_IsAnonymous, 
    [1] id 
    [1] } 
    [1] fragment F2 on Viewer { 
    [1] id, 
    [1] ...F1 
    [1] } 
    [1] fragment F3 on Viewer { 
    [1] User_IsAnonymous, 
    [1] User_AuthToken, 
    [1] id, 
    [1] ...F0, 
    [1] ...F2, 
    [1] ...F1 
    [1] }, , children=[fieldName=id, kind=Field, isGenerated=true, isRequisite=true, type=ID, , children=[fieldName=User_IsAnonymous, kind=Field, , type=Boolean, fieldName=User_AuthToken, kind=Field, , type=String, fieldName=id, kind=Field, isGenerated=true, isRequisite=true, type=ID, , children=[fieldName=User_IsAnonymous, kind=Field, , type=Boolean, fieldName=User_DisplayName, kind=Field, , type=String, fieldName=User_ProfilePhoto, kind=Field, , type=String, fieldName=id, kind=Field, isGenerated=true, isRequisite=true, type=ID], id=1::client, kind=Fragment, , name=AppBar_Auth_ViewerRelayQL, type=Viewer, $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"], name=$$_aggregated-$$_route[1][email protected]@default_Viewer-$$_route[2][email protected]@default_Viewer, , __calls__=null, __children__=[$ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["children"][0], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__route__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__variables__"], __calls__=[], __children__=[], __fieldMap__=null, __hasDeferredDescendant__=false, __hasValidatedConnectionCalls__=null, __serializationKey__=null, __storageKey__=null, __debugName__=undefined, __isRefQueryDependency__=false, __rangeBehaviorKey__=undefined, __shallowHash__=undefined, $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["children"][1], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__route__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__variables__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__children__"][0]["__calls__"], __children__=[], __fieldMap__=null, __hasDeferredDescendant__=false, __hasValidatedConnectionCalls__=null, __serializationKey__=null, __storageKey__=null, __debugName__=undefined, __isRefQueryDependency__=false, __rangeBehaviorKey__=undefined, __shallowHash__=undefined, $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["children"][2], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__route__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__variables__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__children__"][0]["__calls__"], __children__=[], __fieldMap__=null, __hasDeferredDescendant__=false, __hasValidatedConnectionCalls__=null, __serializationKey__=null, __storageKey__=null, __debugName__=undefined, __isRefQueryDependency__=false, __rangeBehaviorKey__=undefined, __shallowHash__=undefined, $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["children"][3], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__route__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__variables__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__children__"][0]["__calls__"], __children__=[], __fieldMap__=null, __hasDeferredDescendant__=false, __hasValidatedConnectionCalls__=null, __serializationKey__=null, __storageKey__=null, __debugName__=undefined, __isRefQueryDependency__=false, __rangeBehaviorKey__=undefined, __shallowHash__=undefined], __fieldMap__=null, __hasDeferredDescendant__=false, __hasValidatedConnectionCalls__=null, __serializationKey__=null, __storageKey__=null, __compositeHash__=_1::client1hz3YB, isDeferred=false, isContainerFragment=true, __cacheKey__=$$_aggregated-$$_route[1][email protected]@default_Viewer-$$_route[2][email protected]@default_Viewer:{}:{isContainerFragment:true,isDeferred:false}, _fragmentGetter=function() { 
    [1]  return buildContainerFragment(containerName, fragmentName, fragmentBuilder, initialVariables); 
    [1]  }, _isContainerFragment=true, _isDeferred=false, _variableMapping=undefined, _prepareVariables=undefined, , children=[fieldName=id, kind=Field, isGenerated=true, isRequisite=true, type=ID, , children=[fieldName=User_IsAnonymous, kind=Field, , type=Boolean, fieldName=id, kind=Field, isGenerated=true, isRequisite=true, type=ID], id=4::client, kind=Fragment, , name=NavMenu_ViewerRelayQL, type=Viewer, $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][4]["_fragment"]["children"][1]["_fragment"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__route__"], , __calls__=null, __children__=[$ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][4]["_fragment"]["children"][1]["_fragment"]["children"][0], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__route__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][4]["_fragment"]["children"][1]["_fragment"]["__cachedFragment__"]["__variables__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__children__"][0]["__calls__"], __children__=[], __fieldMap__=null, __hasDeferredDescendant__=false, __hasValidatedConnectionCalls__=null, __serializationKey__=null, __storageKey__=null, __debugName__=undefined, __isRefQueryDependency__=false, __rangeBehaviorKey__=undefined, __shallowHash__=undefined, $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][4]["_fragment"]["children"][1]["_fragment"]["children"][1], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__route__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][4]["_fragment"]["children"][1]["_fragment"]["__cachedFragment__"]["__variables__"], $ref=$["request"]["_query"]["__concreteNode__"]["children"][1]["_fragment"]["children"][3]["_fragment"]["__cachedFragment__"]["__children__"][0]["__calls__"], __children__=[], __fieldMap__=null, __hasDeferredDescendant__=false, __hasValidatedConnectionCalls__=null, __serializationKey__=null, __storageKey__=null, __debugName__=undefined, __isRefQueryDependency__=false, __rangeBehaviorKey__=undefined, __shallowHash__=undefined], __fieldMap__=null, __hasDeferredDescendant__=false, __hasValidatedConnectionCalls__=null, __serializationKey__=null, __storageKey__=null, __compositeHash__=_4::client3dbVxF, isDeferred=false, isContainerFragment=true, __cacheKey__=$$_aggregated-$$_route[1][email protected]@default_Viewer-$$_route[2][email protected]@default_Viewer:{}:{isContainerFragment:true,isDeferred:false}, _fragmentGetter=function() { 
    [1]  return buildContainerFragment(containerName, fragmentName, fragmentBuilder, initialVariables); 
    [1]  }, _isContainerFragment=true, _isDeferred=false, _variableMapping=undefined, _ 
    [1] /Users/lorm/projects/React-Relay-Boilerplate/node_modules/promise/lib/done.js:10 
    [1]  throw err; 
    [1]  ^
    [1] 
    [1] Error: Can't set headers after they are sent. 
    [1]  at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:346:11) 
    [1]  at ServerResponse.header (/Users/lorm/projects/React-Relay-Boilerplate/node_modules/express/lib/response.js:718:10) 
    [1]  at ServerResponse.send (/Users/lorm/projects/React-Relay-Boilerplate/node_modules/express/lib/response.js:163:12) 
    [1]  at serveFailure (renderOnServer.js:28:21) 
    [1]  at NetworkLayer.onError [as _onError] (renderOnServer.js:58:41) 
    [1]  at NetworkLayer._executeRequest$ (/Users/lorm/projects/React-Relay-Boilerplate/node_modules/relay-local-schema/lib/NetworkLayer.js:71:18) 
    [1]  at tryCatch (/Users/lorm/projects/React-Relay-Boilerplate/node_modules/relay-local-schema/node_modules/babel-runtime/regenerator/runtime.js:72:40) 
    [1]  at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/lorm/projects/React-Relay-Boilerplate/node_modules/relay-local-schema/node_modules/babel-runtime/regenerator/runtime.js:334:22) 
    [1]  at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/lorm/projects/React-Relay-Boilerplate/node_modules/relay-local-schema/node_modules/babel-runtime/regenerator/runtime.js:105:21) 
    [1]  at tryCatch (/Users/lorm/projects/React-Relay-Boilerplate/node_modules/relay-local-schema/node_modules/babel-runtime/regenerator/runtime.js:72:40) 
+0

これは型エラーのようです。私たちはUniversal React Boilerplateを使用していましたが、Cassandraコードを手に入れました.Cassandra.uuidの代わりにnode-uuidを使うことができると思いましたが、前者は文字列を返し、後はオブジェクトを返します。 – lorm

+0

「エラー:送信後にヘッダーを設定できません。」というエラーが発生したと思われる関連コードを追加する必要があります。 –

+0

Ahmad Ferdous Bin Alamの "Can not set headers"エラーは、以前のエラーが出力されたという事実の主な副作用です。私はそれを完全性のために含めましたが、私たちはそれをすべて無視することができると思います。 – lorm

答えて

0

これは型エラーのようです。私たちはUniversal React Boilerplateを使用していましたが、Cassandraコードを手に入れました.Cassandra.uuidの代わりにnode-uuidを使うことができると思いましたが、前者は文字列を返し、後はオブジェクトを返します。

関連する問題