Unable to load plugin (yarn pnp issue?)
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
To reproduce:
import { execSync } from 'node:child_process';
execSync(
'lessc --clean-css="--s1 --advanced --compatibility=ie8" index.less style.css',
{ stdio: 'inherit' },
);
Current behavior:
It seems that less cannot find clean-css.
Unable to load plugin clean-css please make sure that it is installed under or at the same level as less
Expected behavior:
Expected that less would find clean-css.
Environment information:
lessversion:4.4.1nodejsversion:v22.15.0operating system:macos 14.6.1 (23G93)yarnversion:4.9.1less-plugin-clean-cssversion:1.6.0clean-cssversion:5.3.3
Additional context
- packages installed as dev deps (
yarn add -D) in yarn workspace using pnp - script is run with
yarn dotenvx run tsx ./script.ts
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the command from script.ts with the listed Yarn Plug'n'Play environment, using index.less as the input and style.css as the output. Trace why less cannot load clean-css through less-plugin-clean-css, then verify that the command completes and produces the expected stylesheet without the plugin error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100