Answer the question
In order to leave comments, you need to log in
Why is webpack not working?
I want to configure the build of the scss + js project. I do as described in the article https://tproger.ru/translations/webpack-basics/ ,
but after installing the packages for compiling styles (npm install style-loader css-loader sass-loader node-sass extract-text-webpack- plugin -D) and running npm run build I get these errors. I have no idea what to do.
E:\projects\onepage>npm run build
> [email protected] build E:\projects\onepage
> webpack
(node:9448) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
E:\projects\onepage\node_modules\webpack\lib\Chunk.js:827
throw new Error(
^
Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
at Chunk.get (E:\projects\onepage\node_modules\webpack\lib\Chunk.js:827:9)
at E:\projects\onepage\node_modules\extract-text-webpack-plugin\dist\index.js:176:48
at Array.forEach (<anonymous>)
at E:\projects\onepage\node_modules\extract-text-webpack-plugin\dist\index.js:171:18
at AsyncSeriesHook.eval [as callAsync] (eval at create (E:\projects\onepage\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:7:1)
at AsyncSeriesHook.lazyCompileHook (E:\projects\onepage\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.seal (E:\projects\onepage\node_modules\webpack\lib\Compilation.js:1215:27)
at hooks.make.callAsync.err (E:\projects\onepage\node_modules\webpack\lib\Compiler.js:541:17)
at _err0 (eval at create (E:\projects\onepage\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:11:1)
at _addModuleChain (E:\projects\onepage\node_modules\webpack\lib\Compilation.js:1066:12)
at processModuleDependencies.err (E:\projects\onepage\node_modules\webpack\lib\Compilation.js:982:9)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\Сергей\AppData\Roaming\npm-cache\_logs\2018-10-12T11_03_54_834Z-debug.log
Answer the question
In order to leave comments, you need to log in
most likely the article uses the old version of webpack, from version 4+ extract-text-webpack-plugin is not supported. Instead, it is recommended to use mini-css-extract-plugin.
I do not recommend following an outdated article, because the API has changed quite a lot since the 4th version, it is better to read the documentation
. Or, roll back your webpack to version 3.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question