
Jesús Marcano
PreguntaIntento compilar y me sale el siguiente error:
`ERROR in ./src/assets/styles/App.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): TypeError: The 'compilation' argument must be an instance of Compilation at getCompilationHooks (C:\Users\Mark4nov\platzi\platzivideo\node_modules\webpack\lib\javascript\JavascriptModulesPlugin.js:119:10) at C:\Users\Mark4nov\platzi\platzivideo\node_modules\webpack\lib\javascript\CommonJsChunkFormatPlugin.js:30:19 at Hook.eval [as call] (eval at create (C:\Users\Mark4nov\Platzi\PlatziVideo\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:1) at Hook.CALL_DELEGATE [as _call] (C:\Users\Mark4nov\Platzi\PlatziVideo\node_modules\tapable\lib\Hook.js:14:14) at Compiler.newCompilation (C:\Users\Mark4nov\Platzi\PlatziVideo\node_modules\webpack\lib\Compiler.js:992:30) at C:\Users\Mark4nov\Platzi\PlatziVideo\node_modules\webpack\lib\Compiler.js:1035:29 at Hook.eval [as callAsync] (eval at create (C:\Users\Mark4nov\Platzi\PlatziVideo\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\Mark4nov\Platzi\PlatziVideo\node_modules\tapable\lib\Hook.js:18:14) at Compiler.compile (C:\Users\Mark4nov\Platzi\PlatziVideo\node_modules\webpack\lib\Compiler.js:1030:28) at Compiler.runAsChild (C:\Users\Mark4nov\Platzi\PlatziVideo\node_modules\webpack\lib\Compiler.js:497:8) @ ./src/components/HelloWorld.jsx 2:0-35 @ ./src/index.js 3:0-49 4:50-60 webpack 5.21.1 compiled with 1 error in 2748 ms i 「wdm」: Failed to compile.
Este es mi web-pack-config:
const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js', }, resolve: { extensions: ['.js', '.jsx'], }, module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', }, }, { test: /\.html$/, use: [ { loader: 'html-loader', } ] }, { test: /\.(s*)css$/, use:[ { loader: MiniCssExtractPlugin.loader }, 'css-loader', 'sass-loader' ] } ], }, plugins: [ new HtmlWebpackPlugin({ template: './public/index.html', filename: './index.html', }), new MiniCssExtractPlugin({ filename: 'assets/[name].css' }) ] };``` Si comento el import del archivo .scss compila bien. Si cambio el nombre del archivo me dice "No se encuentra", y si borro totalmente el contenido del mismo, me salta el mismo error de arriba.

Jesús Marcano
Se ha arreglado solo. Cerré todo, me fui un rato a ver un podcast, y al regresar y ver que nadie había respondido aún, dije "a ver si..." y si, funcionó. xD