You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot use 'in' operator to search for 'required' in true
--
| [2019-09-09T06:16:07Z] at /buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/normalizer.js:23:22
| [2019-09-09T06:16:07Z] at /buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/normalizer.js:80:62
| [2019-09-09T06:16:07Z] at traverse (/buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/utils.js:92:5)
| [2019-09-09T06:16:07Z] at traverse (/buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/utils.js:117:13)
| [2019-09-09T06:16:07Z] at /buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/utils.js:84:13
| [2019-09-09T06:16:07Z] at Array.forEach (<anonymous>)
| [2019-09-09T06:16:07Z] at traverseObjectKeys (/buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/utils.js:82:22)
| [2019-09-09T06:16:07Z] at Object.traverse (/buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/utils.js:103:9)
| [2019-09-09T06:16:07Z] at /buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/normalizer.js:80:17
| [2019-09-09T06:16:07Z] at Map.forEach (<anonymous>)
| [2019-09-09T06:16:07Z] at Object.normalize (/buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/normalizer.js:79:11)
| [2019-09-09T06:16:07Z] at Object.<anonymous> (/buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/index.js:119:78)
| [2019-09-09T06:16:07Z] at step (/buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/index.js:56:23)
| [2019-09-09T06:16:07Z] at Object.next (/buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/index.js:37:53)
| [2019-09-09T06:16:07Z] at /buildkite/builds/buildkite-agent-7b9d66c86c-qjbr5-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-to-typescript/dist/src/index.js:31:71
| [2019-09-09T06:16:07Z] at new Promise (<anonymous>)
issue seems to be, that the if-condition is in the wrong order: if (!('required' in schema) && isObjectType(schema))
if schema is not an object this results in error.
This way it would work: if (isObjectType(schema) && !('required' in schema))
Getting this error when upgrading to 7.1:
To reproduce, check out https://github.com/sourcegraph/sourcegraph/pull/5083 and run
yarn
in the root. The calls are in the Gulpfile and the schemas are in theschema/
directory.The text was updated successfully, but these errors were encountered: