nystudio107 / annotated-webpack-config

This is the companion github repo for the "An Annotated webpack 4 Config for Frontend Web Development" article.
https://nystudio107.com/blog/an-annotated-webpack-4-config-for-frontend-web-development
MIT License
435 stars 75 forks source link

App crashes during build #17

Closed barlowm closed 5 years ago

barlowm commented 5 years ago

Cloned from current repo, did npm install followed by npm run build



> example-project@1.1.2 build D:\_Code\6_19_WIP\annotated-webpack-4-config
> webpack --config webpack.prod.js --progress --hide-modules
No matching files found.
source: http://example.test/ dest: ./web/dist/criticalcss/index_critical.min.css
 92% [1] after chunk asset optimization SourceMapDevToolPlugin ...rs~confetti~vue.eec2757c53f003b2af
 92% [1] after chunk asset optimization SourceMapDevToolPlugin js\app.0eb772a0d13ae3280443.js genera
 92% [1] after chunk asset optimization SourceMapDevToolPlugin js\confetti.53e58c8ba32f920f21c9.js g
 92% [1] after chunk asset optimization SourceMapDevToolPlugin ...rs~confetti~vue.eec2757c53f003b2af
 92% [1] after chunk asset optimization SourceMapDevToolPlugin js\app.0eb772a0d13ae3280443.js attach
 92% [1] after chunk asset optimization SourceMapDevToolPlugin js\confetti.53e58c8ba32f920f21c9.js a
 93% [1] emitting ImageminWebpWebpackPluginimagemin-webp-webpack-plugin: 0 KB saved
 95% [1] after emitting SizeLimitsPluginWebpack Bundle Analyzer saved report to D:\_Code\6_19_WIP\an
notated-webpack-4-config\web\dist\report-modern.html
 96% [0] after chunk asset optimization SourceMapDevToolPlugin css\styles.9d19cbe4b286aabb5603.css g
 96% [0] after chunk asset optimization SourceMapDevToolPlugin js\styles-legacy.9d19cbe4b286aabb5603
 96% [0] after chunk asset optimization SourceMapDevToolPlugin ...etti~vue-legacy.43cf7fbb65ac3dbcc3
 96% [0] after chunk asset optimization SourceMapDevToolPlugin js\app-legacy.0bd7686c585860d86e5e.js
 96% [0] after chunk asset optimization SourceMapDevToolPlugin ...confetti-legacy.b91b16e94e4e5583f8
 96% [0] after chunk asset optimization SourceMapDevToolPlugin js\styles-legacy.9d19cbe4b286aabb5603
 96% [0] after chunk asset optimization SourceMapDevToolPlugin ...etti~vue-legacy.43cf7fbb65ac3dbcc3
 96% [0] after chunk asset optimization SourceMapDevToolPlugin js\app-legacy.0bd7686c585860d86e5e.js
 96% [0] after chunk asset optimization SourceMapDevToolPlugin ...confetti-legacy.b91b16e94e4e5583f8
 97% [0] emitting clean-webpack-pluginclean-webpack-plugin: removed web\dist\js
clean-webpack-plugin: removed web\dist\js\app.0eb772a0d13ae3280443.js
clean-webpack-plugin: removed web\dist\js\app.0eb772a0d13ae3280443.js.map
clean-webpack-plugin: removed web\dist\js\confetti.53e58c8ba32f920f21c9.js
clean-webpack-plugin: removed web\dist\js\confetti.53e58c8ba32f920f21c9.js.map
clean-webpack-plugin: removed web\dist\js\precache-manifest.a4d02ebca493b629c7a6581e6888e3b3.js
clean-webpack-plugin: removed web\dist\js\vendors~confetti~vue.eec2757c53f003b2af23.js
clean-webpack-plugin: removed web\dist\js\vendors~confetti~vue.eec2757c53f003b2af23.js.gz
clean-webpack-plugin: removed web\dist\js\vendors~confetti~vue.eec2757c53f003b2af23.js.map
clean-webpack-plugin: removed web\dist\manifest.json
clean-webpack-plugin: removed web\dist\report-modern.html
 97% [0] emitting SaveRemoteFilePlugin Remote file downloaded:  ...ics.80e9f663857fe3a4f3b2826ec5ab4
 99% [0] after emitting CriticalCssWebpackPluginTypeError: Cannot read property 'content-type' of un
defined
    at temp (D:\_Code\6_19_WIP\annotated-webpack-4-config\node_modules\critical\lib\file-helper.js:1
06:37)
    at D:\_Code\6_19_WIP\annotated-webpack-4-config\node_modules\critical\lib\file-helper.js:199:27
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! example-project@1.1.2 build: `webpack --config webpack.prod.js --progress --hide-modules`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example-project@1.1.2 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-06-21T23_33_37_639Z-debug.l
og```
khalwat commented 5 years ago

You have nothing in the critical css array.