1

I got a new computer and tried to open an older project but I keep getting this error whenever I run development and I just don't understand why. The project fully works on my old pc.

I tried updating all devdependencies or just the css-loaders but neither worked. And I do have a postcss config file, tried to update stylelint too.

this is the github

ERROR in ./~/css-loader?{"importLoaders":1}!./~/postcss-loader!./src/css/style.css
Module build failed: Error: No configuration provided for /Users/hoyhym/Desktop/test/src/css/style.css
    at module.exports (/Users/hoyhym/Desktop/test/node_modules/stylelint/lib/utils/configurationError.js:8:27)
    at stylelint._fullExplorer.load.then.then.config (/Users/hoyhym/Desktop/test/node_modules/stylelint/lib/getConfigForFile.js:39:13)
 @ ./src/css/style.css 4:14-142 13:2-17:4 14:20-148
 @ multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server ./~/react-dev-utils/webpackHotDevClient.js ./src/css/style.css ./src/js/script.js
1
  • 1
    I saw this error when using stylelint, but forgetting to include a .stylelintrc. Adding the .stylelintrc fixed the issue. If it was the same problem for you, let me know and I'll turn this into a full answer. Commented Mar 26, 2019 at 18:06

1 Answer 1

1

I had the same problem a few days ago. It seems that this issue can pop up depending on where exactly is your webpack config stored inside the project, or where exactly you are calling the webpack command from.

Try adding the options: config: path inside your 'postcss-loader'

          use: [
            { loader: 'css-loader', options: { importLoaders: 1 }},
            { loader: 'postcss-loader', options: { config: { path: './postcss.config'}}}
          ]
Sign up to request clarification or add additional context in comments.

4 Comments

I added the options:... but unfortunately I still get the error
the same error, but with config and path{...} after postcss-loader in the first line of the error
Can you paste your package.json and webpack config so I can try to recreate your case and versions.
they are in the github link I posted above, thank you for helping

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.