gulp requires network connection
Created by: keegancsmith
I can't run launch.sh
since some of the gulp steps require an active internet connection. However, if I comment them out everything still works (assuming I have the older build artifacts present). Personally I often like to work without an internet connection (for focus), and I know others often try to develop while commuting (with spotty internet). It would be great if we adjusted these steps to just warn if networking fails.
16:06:20 web | [16:06:20] Starting 'graphQLTypes'...
16:06:20 web | [16:06:20] 'schema' errored after 240 ms
16:06:20 web | [16:06:20] Error: Error downloading http://json-schema.org/draft-07/schema
16:06:20 web | getaddrinfo ENOTFOUND json-schema.org json-schema.org:80
16:06:20 web | at /Users/keegan/go/src/github.com/sourcegraph/sourcegraph/node_modules/json-schema-ref-parser/lib/resolvers/http.js:127:16
16:06:20 web | at process._tickCallback (internal/process/next_tick.js:68:7)
16:06:20 web | Error: getaddrinfo ENOTFOUND json-schema.org json-schema.org:80
16:06:20 web | at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
16:06:20 web | [16:06:20] 'watch' errored after 243 ms
16:06:20 web | [16:06:20] The following tasks did not complete: graphQLTypes
16:06:20 web | [16:06:20] Did you forget to signal async completion?
Patch to work offline
diff --git a/gulpfile.ts b/gulpfile.ts
index a8a1d9c..1b98311 100644
--- a/gulpfile.ts
+++ b/gulpfile.ts
@@ -271,8 +271,7 @@ export const build = gulp.parallel(
*/
export const watch = gulp.series(
// Ensure the typings that TypeScript depends on are build to avoid first-time-run errors
- gulp.parallel(schema, graphQLTypes),
- gulp.parallel(watchSass, watchSchema, watchGraphQLTypes, watchTypescript, webpackServe)
+ gulp.parallel(watchSass, watchTypescript, webpackServe)
)
/**