codeclimate-stylelint icon indicating copy to clipboard operation
codeclimate-stylelint copied to clipboard

Error: Could not find "stylelint-config-recess-order". Do you need a `configBasedir`?

Open starikcetin opened this issue 4 years ago • 2 comments
trafficstars

I am getting the following error:

•• Timing: .engineConfig: 0.025s
Error: Could not find "stylelint-config-recess-order". Do you need a `configBasedir`?
See our documentation at https://docs.codeclimate.com/docs/stylelint for more information.

This is my stylelint.config.js file:

const rootNodeModulesPath = require('path').resolve(
  __dirname,
  '..',
  'node_modules'
);

const getAbsolutePath = (name) => `${rootNodeModulesPath}/${name}`;

const extendsNames = [
  'stylelint-config-standard',
  'stylelint-config-sass-guidelines',
  'stylelint-config-recess-order',
];

const extendsPaths = extendsNames.map(getAbsolutePath);

module.exports = {
  extends: extendsPaths,
  plugins: [],
  rules: {
    'order/properties-alphabetical-order': null,
    'max-nesting-depth': null,
    'selector-max-id': null,
  },
};

Everything works fine when I run stylelint locally via CLI.

Any ideas on how to fix this? Thanks.


This is the extend that the error message mentions: https://github.com/stormwarning/stylelint-config-recess-order

starikcetin avatar Feb 28 '21 14:02 starikcetin

Hey @starikcetin

stylelint-config-recess-order isn't included in this engine dependencies. Codeclimate doesn't install your dependencies, that's why it works locally.

gilbarbara avatar Feb 28 '21 21:02 gilbarbara

Hey @starikcetin

stylelint-config-recess-order isn't included in this engine dependencies. Codeclimate doesn't install your dependencies, that's why it works locally.

So, is there any way of fixing this? How can I tell CodeClimate to install my dependencies?

starikcetin avatar Mar 01 '21 09:03 starikcetin