From 859e412211364a56ed61da80f43268809d4c9ed9 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Sat, 9 Apr 2016 12:44:51 -0700 Subject: [PATCH] Print errors unless it's just that the file doesn't exist fixes #227 --- lib/utils/build-page/url-resolver.js | 4 +++- lib/utils/webpack.config.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/utils/build-page/url-resolver.js b/lib/utils/build-page/url-resolver.js index 281ba32096655..d0813aa019e44 100644 --- a/lib/utils/build-page/url-resolver.js +++ b/lib/utils/build-page/url-resolver.js @@ -8,7 +8,9 @@ try { const nodeConfig = require(gatsbyNodeConfig) rewritePath = nodeConfig.rewritePath } catch (e) { - // Ignore + if (e.code !== 'MODULE_NOT_FOUND') { + console.log(e) + } } export default function pathResolver (pageData, parsedPath) { diff --git a/lib/utils/webpack.config.js b/lib/utils/webpack.config.js index 8ebf4fdca9959..69c91d78efd99 100644 --- a/lib/utils/webpack.config.js +++ b/lib/utils/webpack.config.js @@ -10,7 +10,9 @@ try { const nodeConfig = require(gatsbyNodeConfig) modifyWebpackConfig = nodeConfig.modifyWebpackConfig } catch (e) { - // Ignore + if (e.code !== 'MODULE_NOT_FOUND') { + console.log(e) + } } module.exports = (program, directory, stage, webpackPort = 1500, routes = []) => {