2
votes

When running Webpack, I get the following error:

./src/css/main.css 3.62 KiB {0} [not cacheable] [built] [failed] [1 error]

ERROR in ./src/css/main.css Module build failed (from ./node_modules/css-loader/dist/cjs.js): ... accumulator[normalizedUrl] = { ...accumulator[normalizedUrl], ^^^ ...

webpack.config.js:

    module: {
      rules: [
        {
         test: /\.css$/i,
         use: ['css-loader']
        }
      ]
    }

css:

    body {
      background-color:purple;
    }

js:

    import css from '../css/main.css';

on js file, if I enter

    import '../css/main.css';

I get the same error.

I'd appreciate your help please.

1

1 Answers

0
votes

Resolved the issue by upgrading node.