Stylelint@16 not compatible with node 12, yarn install error

115 Views Asked by At

I have fallen into the pit of a broken environment. My current situation is that when I run yarn install I get an error of error [email protected]: The engine "node" is incompatible with this module. Expected version ">=18.12.0". Got "12.22.12" error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.. I need node 12 for the project. This is a Laravel/valet project.

I am begining to assume that this isnt even the real issue. I changed the version of stylelint in both my package.json and package-lock.json. I tried an npm uninstall... that may not have done anything. I installe the correct version I needed. deleted my node modules file and rebuilt it. Nothing. I cant even find where this pacakage is coming from. Full disclosure, I have been coding for 3 years but I am still a rookie.

1

There are 1 best solutions below

0
comic sans slave On

You kinda have two options.

  1. Update your node version to at least 18.12.0, because that the min requirement for stylelint(which is probably some nested dependency)
  2. Look up in your yarn.lock*(package.json is used when u use npm yarn.lock for yarn) file which package has stylelint@16 as depdendecy and overwrite its version with a lower version of stylelint https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/