Node.js GatsbyJS-提取文本网页包插件出错

Node.js GatsbyJS-提取文本网页包插件出错,node.js,reactjs,webpack,static-site,gatsby,Node.js,Reactjs,Webpack,Static Site,Gatsby,我正在使用GatsbyJS创建一个静态站点,在尝试生成生产构建时遇到了几个问题 当我执行gatsby develope时,一切运行正常,但当我尝试gatsby build时,我现在遇到以下错误: /home/coder/Developer/portfolio/node_modules/extract-text-webpack-plugin/index.js:22 if(c.initial) return; ^ TypeError: Can

我正在使用GatsbyJS创建一个静态站点,在尝试生成生产构建时遇到了几个问题

当我执行
gatsby develope
时,一切运行正常,但当我尝试
gatsby build
时,我现在遇到以下错误:

/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
/home/coder/Developer/portfolio/node\u modules/extract text webpack plugin/index.js:22
如果(c.初始)返回;
^
TypeError:无法读取未定义的属性“initial”
在ExtractTextPlugin。(/home/coder/Developer/portfolio/node_modules/extract text webpack plugin/index.js:22:8)
at Array.forEach(本机)
在ExtractTextPlugin.mergeninitialchunks(/home/coder/Developer/portfolio/node_modules/extract text webpack plugin/index.js:21:16)
在ExtractTextPlugin。(/home/coder/Developer/portfolio/node_modules/extract text webpack plugin/index.js:275:12)
at Array.forEach(本机)
在ExtractTextPlugin。(/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
在Object.async.forEachOf.async.eachOf(/home/coder/Developer/portfolio/node_modules/extract text webpack plugin/node_modules/async/lib/async.js:236:30)
在Object.async.forEach.async.each(/home/coder/Developer/portfolio/node_modules/extract text webpack plugin/node_modules/async/lib/async.js:209:22)
在ExtractTextPlugin。(/home/coder/Developer/portfolio/node_modules/extract text webpack plugin/index.js:237:10)
在Compilation.applypluginasync(/home/coder/Developer/portfolio/node_modules/tapable/lib/tapable.js:71:13)
在Compilation.seal(/home/coder/Developer/portfolio/node_modules/webpack/lib/Compilation.js:525:7)
在编译器上。(/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
在汇编时。(/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
请让我知道,如果我发布了太多的信息或可以提高问题的质量。我想说得尽可能具体

谢谢你的帮助

对于那些访问此页面寻找答案的人:此问题是由文件夹“pages”中的页面以外的任何内容引起的。将样式化和共享组件移动到根目录解决了这个问题