GatsbyJS - 解压缩文本webpack插件错误

问题描述:

我正在使用GatsbyJS创建一个静态网站,并且在尝试生成生产版本时遇到了几个问题。GatsbyJS - 解压缩文本webpack插件错误

一切都正常运行,当我做gatsby develop但是当我尝试gatsby build我看到下面的错误(S)现在:

/home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/index.js:22 
      if(c.initial) return; 
       ^

TypeError: Cannot read property 'initial' of undefined 
    at ExtractTextPlugin.<anonymous> (/home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/index.js:22:8) 
    at Array.forEach (native) 
    at ExtractTextPlugin.mergeNonInitialChunks (/home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/index.js:21:16) 
    at ExtractTextPlugin.<anonymous> (/home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/index.js:275:12) 
    at Array.forEach (native) 
    at ExtractTextPlugin.<anonymous> (/home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/index.js:273:21) 
    at /home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/node_modules/async/lib/async.js:52:16 
    at Object.async.forEachOf.async.eachOf (/home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/node_modules/async/lib/async.js:236:30) 
    at Object.async.forEach.async.each (/home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/node_modules/async/lib/async.js:209:22) 
    at ExtractTextPlugin.<anonymous> (/home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/index.js:237:10) 
    at Compilation.applyPluginsAsync (/home/coder/Developer/portfolio/node_modules/tapable/lib/Tapable.js:71:13) 
    at Compilation.seal (/home/coder/Developer/portfolio/node_modules/webpack/lib/Compilation.js:525:7) 
    at Compiler.<anonymous> (/home/coder/Developer/portfolio/node_modules/webpack/lib/Compiler.js:397:15) 
    at /home/coder/Developer/portfolio/node_modules/tapable/lib/Tapable.js:103:11 
    at Compilation.<anonymous> (/home/coder/Developer/portfolio/node_modules/webpack/lib/Compilation.js:445:10) 
    at /home/coder/Developer/portfolio/node_modules/webpack/lib/Compilation.js:417:12 

请让我知道,如果我已经发布的信息太多或可提高问题的质量。我想尽可能具体。
感谢您的帮助!

对于那些到此页面寻找答案的人:此问题是由除了“页面”文件夹中的页面之外的任何内容引起的。将风格化和共享的组件移动到根部解决了问题。