我正在使用 GatsbyJS 创建一个静态站点,并且在尝试生成生产版本时遇到了几个问题。
当我这样做时一切都运行良好,gatsby develop
但是当我尝试时,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
如果我发布了太多信息或可以提高问题的质量,请告诉我。我想尽可能具体。
谢谢你的帮助!