Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI does not work with yarn 2+ on Windows #811

Open
HalvorHaugan opened this issue Sep 17, 2024 · 0 comments
Open

CLI does not work with yarn 2+ on Windows #811

HalvorHaugan opened this issue Sep 17, 2024 · 0 comments

Comments

@HalvorHaugan
Copy link

How to reproduce:

  1. Initialize Yarn as described here: https://yarnpkg.com/getting-started/install (corepack enable then yarn init -2)
  2. Install CLI: yarn add --dev lightningcss-cli
  3. Try running it: yarn lightningcss -V

Error message:

C:\(redacted)\.pnp.cjs:5754
    throw firstError;
    ^

Error: Qualified path resolution failed: we looked for the following paths, but none could be accessed.

Source path: C:\(redacted)\.yarn\unplugged\lightningcss-cli-npm-1.27.0-292910e4f4\node_modules\lightningcss-cli\lightningcss
Not found: C:\(redacted)\.yarn\unplugged\lightningcss-cli-npm-1.27.0-292910e4f4\node_modules\lightningcss-cli\lightningcss
Not found: C:\(redacted)\.yarn\unplugged\lightningcss-cli-npm-1.27.0-292910e4f4\node_modules\lightningcss-cli\lightningcss.js
Not found: C:\(redacted)\.yarn\unplugged\lightningcss-cli-npm-1.27.0-292910e4f4\node_modules\lightningcss-cli\lightningcss.json
Not found: C:\(redacted)\.yarn\unplugged\lightningcss-cli-npm-1.27.0-292910e4f4\node_modules\lightningcss-cli\lightningcss.node

    at require$$0.Module._resolveFilename (C:\(redacted)\.pnp.cjs:5753:13)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at require$$0.Module._load (C:\(redacted)\.pnp.cjs:5644:31)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

Node.js v20.7.0

I have also tried with Yarn Plug'n'Play turn off. Then the error message looks like this:

node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module 'C:\(redacted)\node_modules\lightningcss-cli\lightningcss'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.7.0

It works fine with Yarn 1, which seems to use the .bin directory instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant