how to fix yarn dlx @yarnpkg/sdks vscode error?

817 views Asked by At

When I set up the design system I did yarn dlx @yarnpkg/sdks vscode and I got the following error.

YN0001: Error: Your application tried to access color-convert, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.

Required package: color-convert Required by: /Users/parksanghyun/.yarn/berry/cache/ansi-styles-npm-4.3.0-245c7d42c7-8.zip/node_modules/ansi-styles/

So I did yarn add color-convert and I tried yarn dlx @yarnpkg/sdks vscode again, but the same error occurred. How can I fix this error?

1

There are 1 answers

0
jmathew On

In my case I had a .pnp.cjs in my home folder. Removed it and re-ran yarn dlx @yarnpkg/sdks vscode. Every thing worked.

Reference: https://github.com/yarnpkg/berry/issues/5699#issuecomment-1707713273

Do you accidentally have a .pnp.cjs file in your home folder?